Skip to content

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

Merged
clydin merged 1 commit into
angular:mainfrom
clydin:refactor/decouple-compiler-cli
Sep 2, 2026
Merged

refactor(@angular/build): move compiler-cli loading to TypeScriptCompilation#33979
clydin merged 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
@clydin
clydin requested a review from alan-agius4 September 2, 2026 00:58
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 2, 2026
@clydin
clydin merged commit 88e3fc0 into angular:main Sep 2, 2026
40 of 41 checks passed
@clydin

clydin commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

This PR was merged into the repository. The changes were merged into the following branches:

@clydin
clydin deleted the refactor/decouple-compiler-cli branch September 2, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/build target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants