-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: add test to ensure compatibility with ng-linker #22351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add test to ensure compatibility with ng-linker #22351
Conversation
94deda9
to
3c3b1b1
Compare
This will be unblocked with angular/angular#41583 |
8b9186b
to
51606a3
Compare
51606a3
to
0e47338
Compare
This is now unblocked and ready for review. cc. @jelbourn @josephperrott |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Though I am not the right person to confirm this is the correct/best way to test the ng-linker.
0e47338
to
ec3b651
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, you can add merge ready
when ready
cc @petebacondarwin just FYI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some views on some of the naming, which you might like to consider.
I note that this only tests that the partial declarations were processed without error, right? Are there plans to run some e2e tests, or similar, on the resulting linked code?
87b2a7a
to
313e905
Compare
5ff4a07
to
dae982c
Compare
@petebacondarwin I initially considered running e2e tests with the linker, but thought it would be quite tricky/require a lot of refactoring to get that running with our Bazel setup. I've spent more time on this, and got the e2e tests working with partial compilation enabled. @petebacondarwin @jelbourn @josephperrott Please have a look at the second commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM2
load("@npm//@bazel/concatjs:index.bzl", "concatjs_devserver") | ||
load("//:packages.bzl", "getAngularUmdTargets") | ||
load("//tools:defaults.bzl", "ng_module", "sass_binary") | ||
|
||
package(default_visibility = ["//visibility:public"]) | ||
|
||
# List of dependencies that are referenced in the `index.html` file. | ||
devserverIndexHtmlDependencies = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read this as devversionIndexHtmlDependencies
and thought, why...? 😆
* which are not statically analyzable. We work around this by transforming the | ||
* dynamic non-static imports to statically analyzable dynamic imports that can be | ||
* processed by rollup. e.g. "import(`@angular/components-examples/${module}/index.js`") | ||
* will be transformed into an object that merges exports from all possible `${module}` values. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth noting for the future, that if you have @angular/compiler
loaded at runtime, then partial declarations can be JIT compiled to full definitions, without the need for the linker...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. good to know! I'm not sure what's best here; but I imagine the JIT compilation slowing down tests a little bit more (if not significantly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1b7db3f
to
187d28a
Compare
187d28a
to
83f9628
Compare
@devversion needs rebase |
Adds tests to ensure that Angular components is compatible with Angular's patial compilation mode and the linker. A new job running every hour ensures that changes to the partial compilation or linker in Angular `master` are compatible with the components repository. Additionally, we add a job that runs for each commit/PR in order to insure that Angular components remains compatible with the linker of already-released Angular versions.
Address feedback
83f9628
to
b020b3e
Compare
@mmalerba Done 👍 |
* build: add tests to ensure compatibility with ng-linker Adds tests to ensure that Angular components is compatible with Angular's patial compilation mode and the linker. A new job running every hour ensures that changes to the partial compilation or linker in Angular `master` are compatible with the components repository. Additionally, we add a job that runs for each commit/PR in order to insure that Angular components remains compatible with the linker of already-released Angular versions. * build: build and run e2e tests in partial compilation mode * fixup! build: build and run e2e tests in partial compilation mode Address feedback (cherry picked from commit 7d53a6d)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Creates a CI job to ensure compatibility with the ng-linker.