Repository navigation
fix(@angular/build): rebuild library when transitive stylesheet dependencies change in watch mode - #34356
Conversation
|
/gemini review |
c6b5165 to
63b6471
Compare
There was a problem hiding this comment.
Code Review
This pull request refactors the Angular library builder's incremental compilation and watch-mode state management. It introduces the BuilderState class to encapsulate incremental compilation state, transitive resource reference tracking, and watched files, alongside the ExecutionResult class to manage diagnostic messages and build status. The pipeline files, including builder.ts, build-action.ts, and compilation.ts, have been updated to utilize these new classes, simplifying the overall architecture and improving maintainability. Additionally, comprehensive unit and behavior tests have been added to verify the new state management and watch-mode rebuilding. No review comments were provided, so there is no feedback to evaluate.
08f2f8e to
930a706
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces transitive resource dependency tracking to the library builder, enabling more accurate incremental builds in watch mode when stylesheet dependencies (like Sass partials) are modified. The changes include adding reference tracking to BuilderState, updating the watch loop to utilize these references, and adding comprehensive tests to verify the behavior. A critical issue was identified in the watch loop implementation where invalidatedStyles (an iterable) was incorrectly treated as an array, which would cause a runtime error; this has been flagged for correction.
3222521 to
52614da
Compare
…dencies change in watch mode Track transitive stylesheet resource references per containing component and stylesheet file in `BuilderState.addFileReferences`, and resolve affected files via `BuilderState.getAffectedFiles` during watch mode rebuilds. Previously, modifying a Sass partial imported by an inline component stylesheet did not invalidate the containing component file or reset the Sass worker pool cache.
52614da to
01241a1
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
Track transitive stylesheet resource references per containing component and stylesheet file in
BuilderState.addFileReferences, and resolve affected files viaBuilderState.getAffectedFilesduring watch mode rebuilds.Previously, modifying a Sass partial imported by an inline component stylesheet did not invalidate the containing component file or reset the Sass worker pool cache.