8000 fix(@angular/build): correctly remap Angular diagnostics by crisbeto · Pull Request #30645 · angular/angular-cli · GitHub
[go: up one dir, main page]

Skip to content

fix(@angular/build): correctly remap Angular diagnostics #30645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2025

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`.
8000
@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
0