Skip to content

refactor(@angular/build): move compiler-cli loading to TypeScriptCompilation - #33979

Open
clydin wants to merge 1 commit into
angular:mainfrom
clydin:refactor/decouple-compiler-cli
Open

refactor(@angular/build): move compiler-cli loading to TypeScriptCompilation#33979
clydin wants to merge 1 commit into
angular:mainfrom
clydin:refactor/decouple-compiler-cli

Conversation

@clydin

@clydin clydin commented Aug 31, 2026

Copy link
Copy Markdown
Member

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.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Aug 31, 2026
…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.
@clydin
clydin marked this pull request as ready for review September 1, 2026 14:04
@clydin
clydin force-pushed the refactor/decouple-compiler-cli branch from 92c9a21 to b872a71 Compare September 1, 2026 14:04

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: @angular/build target: minor This PR is targeted for the next minor release

1 participant