Skip to content

refactor(@angular/build): eliminate circular dependencies in bundler context#33123

Open
clydin wants to merge 1 commit intoangular:mainfrom
clydin:refactor-circular-deps-build
Open

refactor(@angular/build): eliminate circular dependencies in bundler context#33123
clydin wants to merge 1 commit intoangular:mainfrom
clydin:refactor-circular-deps-build

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented May 4, 2026

Relocate foundational bundler file types and creation utilities to a new, standalone module to resolve multiple recursive dependencies centered around the utilities implementation. By decoupling the core output file definitions from the heavier build contexts, the overall module graph is streamlined, ensuring cleaner isolation and enabling the removal of several longstanding circular paths from the package golden file.

@clydin clydin force-pushed the refactor-circular-deps-build branch 2 times, most recently from 2e6d8e7 to 33f014d Compare May 4, 2026 19:17
…context

Relocate foundational bundler file types and creation utilities to a new, standalone module to resolve multiple recursive dependencies centered around the utilities implementation. By decoupling the core output file definitions from the heavier build contexts, the overall module graph is streamlined, ensuring cleaner isolation and enabling the removal of several longstanding circular paths from the package golden file.
@clydin clydin force-pushed the refactor-circular-deps-build branch from 33f014d to aff4d52 Compare May 4, 2026 21:23
@clydin clydin marked this pull request as ready for review May 4, 2026 21:25
@clydin clydin 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 May 4, 2026
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 refactors the build system by centralizing file-related types and utilities into a new file, bundler-files.ts. Specifically, it moves BuildOutputFile, BuildOutputFileType, InitialFileRecord, and the helper functions createOutputFile and convertOutputFile from their previous locations in bundler-context.ts and utils.ts. Additionally, SERVER_GENERATED_EXTERNALS has been moved to the server-rendering manifest utility. Review feedback identified critical issues in the new implementations of createOutputFile and convertOutputFile, where the file hash is not invalidated when contents are modified. This could lead to stale hashes and broken incremental builds. Suggestions were provided to consolidate the logic and ensure proper hash recomputation.

Comment thread packages/angular/build/src/tools/esbuild/bundler-files.ts
Comment thread packages/angular/build/src/tools/esbuild/bundler-files.ts
@clydin clydin requested a review from alan-agius4 May 4, 2026 23:59
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