Skip to content

refactor(@angular/build): encapsulate library build state in BuilderState and ExecutionResult - #34355

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:library-builder-state
Oct 15, 2026
Merged

alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:library-builder-state

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

Introduce BuilderState and ExecutionResult to replace SingleBuildState, BuildActionResult, LibraryCompilationDiagnostics, and manual watchedCompilationFiles parameter threading across the library builder pipeline.

BuilderState manages incremental compilation state, watched compilation files, pending compilation modifications across aborted watch iterations, and ExecutionResult diagnostic collection.

@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: minor This PR is targeted for the next minor release labels Oct 15, 2026

@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 library builder's state management by introducing a BuilderState class to encapsulate incremental compilation state, replacing the previous SingleBuildState interface. It also updates the build pipeline to use this state class, improves the efficiency of tracking modified files, and refines the diagnostic reporting mechanism. I have reviewed the suggested improvements regarding pendingCompilationFiles accumulation and the efficiency of merging sets in compileLibrary, both of which are valid and should be incorporated.

Comment thread packages/angular/build/src/builders/library/builder-state.ts
Comment thread packages/angular/build/src/builders/library/pipeline/compilation.ts
…tate and ExecutionResult

Introduce `BuilderState` and `ExecutionResult` to replace `SingleBuildState`, `BuildActionResult`, `LibraryCompilationDiagnostics`, and manual `watchedCompilationFiles` parameter threading across the library builder pipeline.

`BuilderState` manages incremental compilation state, watched compilation files, pending compilation modifications across aborted watch iterations, and `ExecutionResult` diagnostic collection.
@alan-agius4
alan-agius4 force-pushed the library-builder-state branch from 2aaad5e to f68f56c Compare October 15, 2026 13:27
@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 Oct 15, 2026
@alan-agius4
alan-agius4 merged commit d02d39c into angular:main Oct 15, 2026
39 of 40 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

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

@alan-agius4
alan-agius4 deleted the library-builder-state branch October 15, 2026 14:52
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