Skip to content

fix(@angular/build): ensure transitive SCSS partial errors are tracked in watch mode#32883

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:sass/partial-error-rebuilds
Mar 30, 2026
Merged

fix(@angular/build): ensure transitive SCSS partial errors are tracked in watch mode#32883
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:sass/partial-error-rebuilds

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented Mar 27, 2026

When stylesheet bundling fails due to an error in a SCSS partial, we now ensure that referencedFiles are still passed to the FileReferenceTracker. This prevents the dependency between the component and the error file from being lost, allowing the component to be correctly rebuilt when the error is fixed.

…d in watch mode

When stylesheet bundling fails due to an error in a SCSS partial, we now ensure that `referencedFiles` are still passed to the `FileReferenceTracker`. This prevents the dependency between the component and the error file from being lost, allowing the component to be correctly rebuilt when the error is fixed.
@clydin clydin marked this pull request as ready for review March 27, 2026 19:30
@clydin clydin added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 27, 2026
@clydin clydin requested a review from alan-agius4 March 27, 2026 19:30
Copy link
Copy Markdown

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

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 ensures that stylesheet dependencies are tracked even when compilation errors occur, allowing for correct rebuilds once errors are resolved. It adds logic to the Angular compiler plugin to track referenced files in error states and includes regression tests for transitive and deep transitive imports. Review feedback suggests refactoring the new tests into a data-driven loop and consolidating the file tracking logic to avoid duplication between the success and error code paths.

@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 Mar 30, 2026
@alan-agius4 alan-agius4 merged commit 21d8aa4 into angular:main Mar 30, 2026
40 checks passed
@alan-agius4
Copy link
Copy Markdown
Collaborator

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

@clydin clydin deleted the sass/partial-error-rebuilds branch March 30, 2026 10:39
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: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SCSS partial error cached and not invalidated on fix during ng serve (esbuild)

2 participants