Repository navigation
Conversation
…pressions Babel's linker links every ɵɵngDeclare* call; this one walked only some expression kinds and missed declarations inside array and object literals, `new` arguments, member and binary expressions, templates and awaits. A library compiled with Deepkit's runtime types records each static initializer as a function in a `static __type = [...]` array, so every class carried an unlinked copy of its declarations, whose `ngImport: i0` kept all of @angular/core in the bundle (+130 KB minified in an app using @deepkit/desktop-ui).
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f3e67f34b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thanks @Rush! This conflicts with main and I can't push to the org fork, so I carried it over to #620: your commit is kept as is (you stay its author), then I resolved the conflict and added a fix on top that makes the linker visit every call like Babel's, plus parentheses for a factory that starts a statement (Codex's findings here). Closing in favor of #620. |
Babel's linker (
@angular/compiler-cli/linker/babel) links everyɵɵngDeclare*call it meets. This linker walked only some expression kinds and left declarations unlinked inside array and object literals,newarguments, static and computed member expressions, unary and binary expressions, template literals andawait.That matters for libraries compiled with Deepkit's runtime types, which record each static initializer as a function in a
static __type = [...]array:Every class then carried an unlinked copy of its declarations, and their
ngImport: i0kept all of@angular/corein the bundle (+130 KB minified in an app using@deepkit/desktop-ui).walk_expressionnow descends into those expression kinds.test_link_declarations_nested_in_arrays_and_objects(tests/linker_test.rs) links declarations in each position and fails without the change.