Skip to content

refactor(@angular/build): decouple compiler options transformation and remove worker options IPC - #33967

Open
clydin wants to merge 1 commit into
angular:mainfrom
clydin:refactor/compiler-options-worker-ipc
Open

refactor(@angular/build): decouple compiler options transformation and remove worker options IPC#33967
clydin wants to merge 1 commit into
angular:mainfrom
clydin:refactor/compiler-options-worker-ipc

Conversation

@clydin

@clydin clydin commented Aug 28, 2026

Copy link
Copy Markdown
Member

Move the TypeScript compiler options transformation logic from compiler-plugin.ts into transformCompilerOptions in the compilation layer. This replaces numeric literal values with strongly-typed TypeScript enums and encapsulates options normalization within the compilation classes.

Replace the optionsChannel, optionsSignal, and synchronous Atomics barrier between the main thread and the compilation worker thread with serializable CompilerOptionOverrides passed during initialization. Any compiler options transformation warnings are now returned directly in AngularCompilationResult.warnings rather than mutating a main-thread array.

@clydin clydin added the target: minor This PR is targeted for the next minor release label Aug 28, 2026
@clydin
clydin marked this pull request as ready for review August 28, 2026 21:33

@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 pipeline by centralizing TypeScript compiler options transformation into a new transformCompilerOptions utility and replacing the callback-based transformer with a structured CompilerOptionOverrides object. This change simplifies the parallel worker communication by eliminating the synchronous Atomics-based message channel. Feedback on the changes highlights an issue where transformCompilerOptions mutates its input parameter directly instead of cloning it, and points out inconsistencies in how NoopCompilation manually overrides compiler options compared to the main transformation logic.

Comment thread packages/angular/build/src/tools/angular/compilation/noop-compilation.ts Outdated
…d remove worker options IPC

Move the TypeScript compiler options transformation logic from compiler-plugin.ts into transformCompilerOptions in the compilation layer. This replaces numeric literal values with strongly-typed TypeScript enums and encapsulates options normalization within the compilation classes.

Replace the optionsChannel, optionsSignal, and synchronous Atomics barrier between the main thread and the compilation worker thread with serializable CompilerOptionOverrides passed during initialization. Any compiler options transformation warnings are now returned directly in AngularCompilationResult.warnings rather than mutating a main-thread array.
@clydin
clydin force-pushed the refactor/compiler-options-worker-ipc branch from d0207d3 to 93a871b Compare August 28, 2026 23:14
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Aug 29, 2026
@clydin
clydin requested a review from alan-agius4 August 29, 2026 01:25
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant