Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(compiler-cli): report individual diagnostics for unused imports #58589

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

Closed
wants to merge 1 commit into from

Conversation

crisbeto
Copy link
Member

Initially the unused imports check was implemented so that it reports one diagnostic per component with the individual unused imports being highlighted through the relatedInformation. This works fine when reporting errors to the command line, but vscode appears to only show relatedInformation when the user hovers over a diagnostic which is a sub-par experience.

These changes switch to reporting a diagnostic for each unused import instead.

For reference, here's what the diagnostic currently looks like in vscode, after hovering over the node:
diags

Initially the unused imports check was implemented so that it reports one diagnostic per component with the individual unused imports being highlighted through the `relatedInformation`. This works fine when reporting errors to the command line, but vscode appears to only show `relatedInformation` when the user hovers over a diagnostic which is a sub-par experience.

These changes switch to reporting a diagnostic for each unused import instead.
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: rc This PR is targeted for the next release-candidate labels Nov 11, 2024
@crisbeto crisbeto requested a review from devversion November 11, 2024 09:29
@pullapprove pullapprove bot requested a review from clydin November 11, 2024 09:29
@crisbeto crisbeto added this to the v19 final milestone Nov 11, 2024
@ngbot ngbot bot removed this from the v19 final milestone Nov 11, 2024
@thePunderWoman thePunderWoman added the area: compiler Issues related to `ngc`, Angular's template compiler label Nov 11, 2024
@ngbot ngbot bot added this to the Backlog milestone Nov 11, 2024
@crisbeto crisbeto 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 Nov 11, 2024
thePunderWoman pushed a commit that referenced this pull request Nov 11, 2024
…58589)

Initially the unused imports check was implemented so that it reports one diagnostic per component with the individual unused imports being highlighted through the `relatedInformation`. This works fine when reporting errors to the command line, but vscode appears to only show `relatedInformation` when the user hovers over a diagnostic which is a sub-par experience.

These changes switch to reporting a diagnostic for each unused import instead.

PR Close #58589
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit 086cb2c.

The changes were merged into the following branches: main, 19.0.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 Dec 12, 2024
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: compiler Issues related to `ngc`, Angular's template compiler target: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants