Repository navigation
refactor(@angular/build): simplify watch-mode asset precedence and ignore normalization - #34475
Merged
alan-agius4 merged 1 commit intoOct 22, 2026
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the asset tracking and resolution logic in the Angular library builder. It introduces a map to track emitted asset sources, simplifies the priority-based asset resolution and fallback restoration logic in collectAssetsToEmit, and improves glob pattern normalization to support wildcard patterns. Unit tests have been updated to verify these changes. There are no review comments, so I have no feedback to provide.
alan-agius4
force-pushed
the
refactor/library-assets-watch-cleanup
branch
from
October 22, 2026 08:01
6ffc63c to
32806e0
Compare
…nore normalization Simplify incremental asset precedence checks in `collectAssetsToEmit` by relying on in-memory `emittedAssets` state rather than redundant filesystem `statSync` calls, and index emitted asset sources by output path in `BuilderState` for O(1) eviction. Also expand wildcard-suffixed ignore patterns so both direct files and nested directory contents are ignored in watch mode.
alan-agius4
force-pushed
the
refactor/library-assets-watch-cleanup
branch
from
October 22, 2026 08:02
32806e0 to
52521c7
Compare
clydin
approved these changes
Oct 22, 2026
Collaborator
Author
|
This PR was merged into the repository. The changes were merged into the following branches:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #34470:
emittedAssetsstate when checking whether a modified asset is shadowed by a higher-priority matcher in watch mode, avoiding redundantstatSync/lstatSynccalls on every incremental build.emittedAssetsoutput paths directly when restoring lower-priority fallback assets after a higher-priority asset is deleted.BuilderState(#emittedAssetSources) for O(1) eviction when an asset is overridden.normalizeGlobPatternso both direct files and files under matching directories are ignored in watch mode.