Skip to content

fix: Track diagnostic generations per package #20459

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
Aug 14, 2025

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Aug 14, 2025

This means that once flycheck is done, we will clear all diagnostics from the previous run. Why is this nice? Well, right now if you have flycheck diagnostics in crate b, then edit crate a (where crate b depends on crate a) we will get diagnostics in crate a while b's old diagnostics stick around. With this change b will get cleared properly, reducing the amount of diagnostics shown in the problems pane of editors.

r? @ShoyuVanilla

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2025
Copy link
Member

@ShoyuVanilla ShoyuVanilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. In current implementation, the diagnostics from the previous runs would outlive into the next generation altogether workspacewise if there's any diagnostics reported in that workspace. I had considered this (actually, inscribing diagnostics into both workspaces and packages) for the different purpose, for granulated erasure of outdated diagnostics for scenarios like check on save is turned off and flychecks are triggered sporadically on packages but it didn't worked well and I just oversimplified things with disappointment. But as you said, this makes solid improvements in normal usage scenarios 👍

@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Aug 14, 2025
Merged via the queue into master with commit 92ba1cc Aug 14, 2025
15 checks passed
@ShoyuVanilla ShoyuVanilla deleted the veykril/push-pwzyxwuozkrq branch August 14, 2025 13:36
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 14, 2025
@lnicola lnicola changed the title Track diagnostic generations per package fix: Track diagnostic generations per package Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants