Skip to content

Conversation

crisbeto
Copy link
Member

@crisbeto crisbeto commented Jul 3, 2025

The esbuild builder has some logic that re-maps diagnostics coming from the compiler, depending on their source and code. Currently this is incorrect, because it assumes that a value of ngtsc for source always means that the error is from the Angular compiler, but what it actually means is that it comes from an Angular template diagnostics. Furthermore, we can't rely on a source always being defined.

These changes align the logic to a similar one we already have in the compiler where we assume the diagnostic comes from Angular if it starts with -99.

The esbuild builder has some logic that re-map diagnostics coming from the compiler, depending on their `source` and `code`. Currently this is incorrect, because it assumed that a value of `ngtsc` for `source` always means that the error is from the Angular compiler, but what it actually means is that it comes from an Angular template diagnostics. Furthermore, we can't rely on a `source` always being defined.

These changes align the logic to a similar one we already have in the compiler where we assume the diagnostic comes from Angular if it starts with `-99`.
@crisbeto crisbeto requested a review from alan-agius4 July 3, 2025 07:16
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Jul 3, 2025
@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 Jul 3, 2025
@alan-agius4 alan-agius4 merged commit 1cde40e into angular:main Jul 3, 2025
34 checks passed
@alan-agius4
Copy link
Collaborator

The changes were merged into the following branches: main, 20.0.x, 20.1.x

@angular-automatic-lock-bot
Copy link

This issue 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 Aug 3, 2025
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: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants