fix(compiler-cli): avoid crash in isolated transform operations#59869
fix(compiler-cli): avoid crash in isolated transform operations#59869JoostK wants to merge 3 commits intoangular:mainfrom
Conversation
dfb8554 to
d934576
Compare
There was a problem hiding this comment.
Is this a risk meaning that sometimes we may not be able to properly preserve?
There was a problem hiding this comment.
Good question; I'm not 100% certain. My reasoning for this change was that without an emit resolver, the set to build here would never be consumed. I should write a test specifically for this transformer to see if it behaves correctly.
The CLI uses the `ts.transform` API to apply the Angular compiler's transformers on the source files when `isolatedModules` is true (and various other constraints) instead of going through a full `ts.Program.emit` operation. This results in the transformers to operate in an environment where no emit resolver is available, which was not previously accounted for. This commit reflects the possibility for the emit resolver to be missing and handles this scenario accordingly. Fixes angular#59837
3871a4f to
32cf5d7
Compare
|
This PR was merged into the repository by commit 973033a. The changes were merged into the following branches: main, 19.1.x |
The CLI uses the `ts.transform` API to apply the Angular compiler's transformers on the source files when `isolatedModules` is true (and various other constraints) instead of going through a full `ts.Program.emit` operation. This results in the transformers to operate in an environment where no emit resolver is available, which was not previously accounted for. This commit reflects the possibility for the emit resolver to be missing and handles this scenario accordingly. Fixes #59837 PR Close #59869
|
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. |
The CLI uses the
ts.transformAPI to apply the Angular compiler's transformers on the source files whenisolatedModulesis true (and various other constraints) instead of going through a fullts.Program.emitoperation. This results in the transformers to operate in an environment where no emit resolver is available, which was not previously accounted for. This commit reflects the possibility for the emit resolver to be missing and handles this scenario accordingly.Fixes #59837