Skip to content

fix(@angular/build): capture and report Rolldown warnings in library builder - #34228

Open
alan-agius4 wants to merge 2 commits into
angular:mainfrom
alan-agius4:fix/library-rolldown-logs
Open

alan-agius4 wants to merge 2 commits into
angular:mainfrom
alan-agius4:fix/library-rolldown-logs

Conversation

@alan-agius4

@alan-agius4 alan-agius4 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Updates bundleEntryPoints to capture Rolldown warning logs via onLog and return them to buildAction so warnings are logged via the builder logger instead of console.warn.

…in library builder

Updates `bundleEntryPoints` to capture Rolldown warning logs via `onLog` and bundling errors, returning them to `buildAction` so warnings are logged via the builder logger instead of `console.warn` and errors are properly surfaced.

@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 updates the Angular library builder pipeline to capture and propagate warnings and errors emitted during the Rolldown bundling process, including adding a test case to verify warning logging. The review feedback suggests preserving the original error objects and stack traces instead of converting them to strings. Specifically, it is recommended to change the type of errors to unknown[] in the bundle outputs, push the raw error objects directly in the catch block, and throw the original error or an AggregateError in the build action to avoid losing critical diagnostic details.

Comment thread packages/angular/build/src/builders/library/pipeline/bundler.ts Outdated
Comment thread packages/angular/build/src/builders/library/pipeline/bundler.ts Outdated
Comment thread packages/angular/build/src/builders/library/pipeline/bundler.ts Outdated
Comment thread packages/angular/build/src/builders/library/pipeline/build-action.ts Outdated
@alan-agius4 alan-agius4 changed the title fix(@angular/build): capture and report Rolldown warnings and errors in library builder fix(@angular/build): capture and report Rolldown warnings in library builder Oct 1, 2026
@alan-agius4 alan-agius4 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 Oct 1, 2026
@alan-agius4
alan-agius4 requested a review from clydin October 1, 2026 08:52
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