Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

refactor: split kendo-ui-ngcc #471

Closed
wants to merge 10 commits into from
Closed

Conversation

tsvetomir
Copy link
Contributor

  • Split into smaller projects to reduce compilation times and make debugging easier.

There are some good news and some bad news 馃

  • The kendo-ui-charts-ngcc project works without any specific Ivy fixes. Seems like Inputs are not inherited when Ivy is enabled聽angular#30080 is gone for good 馃憤

  • The kendo-ui-grid-ngcc and kendo-ui-scheduler-ngcc projects fail with ERROR in Unsupported binary operator: InKeyword due to an expression in `node_modules/@progress/kendo-angular-dropdowns/dist/fesm5/index.js:

    var touch = isWindowAvailable() && 'ontouchstart' in window;

    The value of the expression is indirectly provided through DI. I didn't see previous reports for that specific issue.

Ref #386

@JoostK
Copy link
Member

JoostK commented Oct 29, 2019

I opened angular/angular#33453 to no longer cause a hard crash for ERROR in Unsupported binary operator: InKeyword, instead interpreting the expression as dynamic. I suspect that will resolve the issue here, as the value of providers does not have to be known at compile time.

I will run some tests (likely tomorrow) based on this PR and an Angular build of angular/angular#33453 to verify this.

@mgechev
Copy link
Member

mgechev commented Oct 29, 2019

I'll merge once we land angular/angular#33453.

@JoostK
Copy link
Member

JoostK commented Oct 29, 2019

After testing angular/angular#33453 in #476 the compilation error is resolved, but e2e tests are still failing:

CI log

### kendo-ui-scheduler-ngcc ###
Status: e2e failure

stderr: npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1572384128411-0.14591729221986238/node but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

Compiling @angular/animations/browser : module as esm5

Compiling @angular/platform-browser/animations : module as esm5

Compiling @progress/kendo-angular-l10n : module as esm5

Compiling @progress/kendo-angular-common : module as esm5

Compiling @progress/kendo-angular-intl : module as esm5

Compiling @progress/kendo-angular-popup : module as esm5

Compiling @progress/kendo-angular-dateinputs : module as esm5

Compiling @progress/kendo-angular-buttons : module as esm5

Compiling @progress/kendo-angular-dialog : module as esm5

Compiling @progress/kendo-angular-dropdowns : module as esm5

Compiling @progress/kendo-angular-inputs : module as esm5

Compiling @progress/kendo-angular-scheduler : module as esm5
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ngcc-validation@0.0.0 ng: `ng "e2e" "kendo-ui-scheduler-ngcc" "--webdriver-update=false"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ngcc-validation@0.0.0 ng script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/circleci/.npm/_logs/2019-10-29T21_26_45_422Z-debug.log

stdout: 
> ngcc-validation@0.0.0 ng /home/circleci/repo
> ng "e2e" "kendo-ui-scheduler-ngcc" "--webdriver-update=false"

@tsvetomir
Copy link
Contributor Author

Thanks @JoostK! I was able to workaround the initial error (Messages$1 is undefined) and published an updated build.

The error we're getting now (el.setAttribute is not a function) seems to be caused by i18n attributes applied to directive inputs on ng-content. I've set up a sample project to illustrate what we're doing in the components to obtain the translated strings.

@petebacondarwin
Copy link
Member

petebacondarwin commented Nov 5, 2019

@tsvetomir - I am going to help look into this, so I rebased on master and pushed to your branch. It seems I don't have rights to push to your branch :-)

@petebacondarwin
Copy link
Member

The next failure for the scheduler is indeed i18n related... It is a bug in the ivy runtime - see angular/angular#33594

@alyssamichelle
Copy link

alyssamichelle commented Nov 5, 2019

I updated @tsvetomir's sample project with the latest 9.0 rc and am still getting the same issue @StephenFluin.

image

We can patch it on our end for when this release hits. However, this would mean that our clients would need to change how things work on their end as well. Any chance there could be a fix on the framework side before release?

@mgechev
Copy link
Member

mgechev commented Nov 5, 2019

@alyssamichelle we're looking into this problem.

@alyssamichelle
Copy link

Thanks @mgechev. You all are truly amazing.

@mgechev
Copy link
Member

mgechev commented Nov 5, 2019

@alyssamichelle, @tsvetomir @AndrewKushnir opened a PR with a fix angular/angular#33599.

It may not be a part of rc.1, but you can start experimenting with it with a custom build.

@petebacondarwin petebacondarwin mentioned this pull request Nov 7, 2019
@petebacondarwin
Copy link
Member

petebacondarwin commented Nov 7, 2019

Closing in favour of #525, which extends this PR and also proves that we are now in a good state for these libraries.

@tsvetomir tsvetomir deleted the kendo-ui-split branch November 13, 2019 12:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants