Skip to content

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

Merged
clydin merged 1 commit into
angular:mainfrom
clydin:refactor-circular-deps-build
May 5, 2026
Merged

refactor(@angular/build): eliminate circular dependencies in bundler context#33123
clydin merged 1 commit into
angular:mainfrom
clydin:refactor-circular-deps-build

Conversation

@clydin

@clydin clydin commented May 4, 2026

Copy link
Copy Markdown
Member

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

@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 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
@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 May 5, 2026
@clydin
clydin merged commit ca4b087 into angular:main May 5, 2026
38 checks passed
@clydin

clydin commented May 5, 2026

Copy link
Copy Markdown
Member Author

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

@clydin
clydin deleted the refactor-circular-deps-build branch May 5, 2026 11:30
@angular-automatic-lock-bot

Copy link
Copy Markdown

This pull request has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Jun 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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