Skip to content

fix: Fix diagnostics not clearing between flychecks #18864

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

Conversation

alexkirsz
Copy link
Contributor

While #18848 fixed an issue with diagnostics clearing too eagerly, and 140f91b fixed an issue with diagnostics state not being properly reset between flychecks, we're still facing an issue where diagnostics are not cleared at all between flychecks runs.

Indeed, if the diagnostic doesn't have a corresponding package_id (as is the case with rustc diagnostics), it won't get cleared between flychecks.

This diff adds a diagnostics_cleared_for_all flag to keep track of such diagnostics, and moves the diagnostics state clearing to its own method.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 7, 2025
self.clear_diagnostics_state();
}

fn clear_diagnostics_state(&mut self) {
Copy link
Member

Choose a reason for hiding this comment

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

👍 we should've done this from the start

@Veykril Veykril enabled auto-merge January 7, 2025 12:10
@alexkirsz
Copy link
Contributor Author

alexkirsz commented Jan 7, 2025

cc @Veykril since you authored both fixes

Nevermind, you answered just after I posted 😁

@Veykril
Copy link
Member

Veykril commented Jan 7, 2025

Thanks!

@Veykril Veykril added this pull request to the merge queue Jan 7, 2025
Merged via the queue into rust-lang:master with commit efb8774 Jan 7, 2025
9 checks passed
@alexkirsz alexkirsz deleted the alexkirsz/fix-diagnostics-clearing branch January 7, 2025 13:21
@lnicola
Copy link
Member

lnicola commented Jan 8, 2025

This is now available in the v0.3.2257 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants