Repository navigation
refactor(@angular/build): move compiler-cli loading to TypeScriptCompilation - #33979
Conversation
…ilation AngularCompilation serves as the top-level compilation contract used across the build pipeline, including on the main thread via ParallelCompilation. Neither AngularCompilation nor ParallelCompilation requires loading @angular/compiler-cli or reading tsconfig.json configurations. The loadCompilerCli and loadConfiguration methods are now moved to TypeScriptCompilation, which is the base class for in-process TypeScript compilations (AotCompilation and JitCompilation). This completely decouples AngularCompilation from @angular/compiler-cli and ensures that compiler-cli loading and configuration parsing are localized exclusively to the worker compilation hierarchy.
92c9a21 to
b872a71
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the Angular compilation context by introducing an abstract AngularCompilationContext with concrete PrimaryCompilationContext and SecondaryCompilationContext implementations, replacing the previous NoopCompilation approach. This enables secondary compilation contexts to delegate readiness and compiler options to the primary context. Additionally, the loading of @angular/compiler-cli has been moved from AngularCompilation to TypeScriptCompilation. I have no feedback to provide as there are no review comments.
|
This PR was merged into the repository. The changes were merged into the following branches:
|
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
AngularCompilation serves as the top-level compilation contract used across the build pipeline, including on the main thread via ParallelCompilation. Neither AngularCompilation nor ParallelCompilation requires loading @angular/compiler-cli or reading tsconfig.json configurations.
The loadCompilerCli and loadConfiguration methods are now moved to TypeScriptCompilation, which is the base class for in-process TypeScript compilations (AotCompilation and JitCompilation). This completely decouples AngularCompilation from @angular/compiler-cli and ensures that compiler-cli loading and configuration parsing are localized exclusively to the worker compilation hierarchy.