Repository navigation
fix(compiler/ngcc): detect synthesized constructors that have been downleveled using TypeScript 4.2 - #41305
Closed
JoostK wants to merge 4 commits into
Closed
fix(compiler/ngcc): detect synthesized constructors that have been downleveled using TypeScript 4.2#41305JoostK wants to merge 4 commits into
JoostK wants to merge 4 commits into
Conversation
JoostK
force-pushed
the
ts42-synthesized-ctors
branch
from
March 21, 2021 20:42
30b3360 to
cc16deb
Compare
JoostK
commented
Mar 21, 2021
JoostK
marked this pull request as ready for review
March 21, 2021 20:58
petebacondarwin
approved these changes
Mar 21, 2021
petebacondarwin
left a comment
Contributor
There was a problem hiding this comment.
I like the way you had three tests - two hard coded and one generated. Covers all our bases.
gkalpak
approved these changes
Mar 22, 2021
… using TS 4.2 TypeScript 4.2 has changed its emitted syntax for synthetic constructors when using `downlevelIteration`, which affects ES5 bundles that have been downleveled from ES2015 bundles. This is typically the case for UMD bundles in the APF spec, as they are generated by downleveling the ESM2015 bundle into ES5. ngcc needs to detect the new syntax in order to correctly identify synthesized constructor functions in ES5 bundles. Fixes angular#41298
…leveled using TS 4.2
… using TS 4.2 TypeScript 4.2 has changed its emitted syntax for synthetic constructors when using `downlevelIteration`, which affects ES5 bundles that have been downleveled from ES2015 bundles. This is typically the case for UMD bundles in the APF spec, as they are generated by downleveling the ESM2015 bundle into ES5. The reflection capabilities in the runtime need to recognize this new form to correctly deal with synthesized constructors, as otherwise JIT compilation could generate invalid factory functions. Fixes angular#41298
…leveled using TS 4.2
JoostK
force-pushed
the
ts42-synthesized-ctors
branch
from
March 22, 2021 17:51
cc16deb to
c772708
Compare
Contributor
AndrewKushnir
approved these changes
Mar 22, 2021
josephperrott
pushed a commit
that referenced
this pull request
Mar 23, 2021
… using TS 4.2 (#41305) TypeScript 4.2 has changed its emitted syntax for synthetic constructors when using `downlevelIteration`, which affects ES5 bundles that have been downleveled from ES2015 bundles. This is typically the case for UMD bundles in the APF spec, as they are generated by downleveling the ESM2015 bundle into ES5. The reflection capabilities in the runtime need to recognize this new form to correctly deal with synthesized constructors, as otherwise JIT compilation could generate invalid factory functions. Fixes #41298 PR Close #41305
TeriGlover
pushed a commit
to TeriGlover/angular
that referenced
this pull request
Apr 5, 2021
… using TS 4.2 (angular#41305) TypeScript 4.2 has changed its emitted syntax for synthetic constructors when using `downlevelIteration`, which affects ES5 bundles that have been downleveled from ES2015 bundles. This is typically the case for UMD bundles in the APF spec, as they are generated by downleveling the ESM2015 bundle into ES5. ngcc needs to detect the new syntax in order to correctly identify synthesized constructor functions in ES5 bundles. Fixes angular#41298 PR Close angular#41305
TeriGlover
pushed a commit
to TeriGlover/angular
that referenced
this pull request
Apr 5, 2021
… using TS 4.2 (angular#41305) TypeScript 4.2 has changed its emitted syntax for synthetic constructors when using `downlevelIteration`, which affects ES5 bundles that have been downleveled from ES2015 bundles. This is typically the case for UMD bundles in the APF spec, as they are generated by downleveling the ESM2015 bundle into ES5. The reflection capabilities in the runtime need to recognize this new form to correctly deal with synthesized constructors, as otherwise JIT compilation could generate invalid factory functions. Fixes angular#41298 PR Close angular#41305
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits.
The fix is only relevant for major (i.e. v12) as TypeScript 4.2 is not supported in v11.
Fixes #41298