Skip to content
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

Error sometimes stick around even after a successful error-free check build completes #18811

Closed
RalfJung opened this issue Jan 1, 2025 · 5 comments · Fixed by #18817
Closed
Assignees
Labels
C-bug Category: bug

Comments

@RalfJung
Copy link
Member

RalfJung commented Jan 1, 2025

I suspect something went wrong when fixing #18283: sometimes I now see errors staying in the UI even when a check build finishes without any error. Just now, this occurred in the following sequence of events in the rustc repo:

  • There was an error in library/core.
  • I fixed that error and hit Ctrl-S, triggering the first check build.
  • This build takes a while, so while it is still going, I also made some other change in compiler/rustc_passes and hit Ctrl-S again, triggering the second check build.

I suspect what happens is that the 2nd build does not mention that library/core got built (because it didn't, it got build in the first build that was canceled when I hit Ctrl-S the second time) and hence the errors there are not cleared properly.

It is worth noting that even when library/core is finished building in the first check build, the error in that crate does not disappear. Something about the logic for recognizing the crate does not seem to work properly here. If I let the build finish as usual, the error dos eventually disappear, but if that build gets interrupted then it seems the error will never be removed.

Cc @Veykril

rust-analyzer version: rust-analyzer version: 0.3.2237-standalone [/home/r/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.2237-linux-x64/server/rust-analyzer]

@RalfJung RalfJung added the C-bug Category: bug label Jan 1, 2025
@ChayimFriedman2
Copy link
Contributor

I think I've also experienced this. I had to restart r-a to fix it.

@Veykril
Copy link
Member

Veykril commented Jan 2, 2025

Ah yes, I can see us cancelling the flycheck causing us to forget about what to clear while cargo won't report for the already processed crates.

@Veykril
Copy link
Member

Veykril commented Jan 2, 2025

Note for the future should this happen again we do have a Clear flycheck diagnostics command that should forcibly clear them all.

@rszyma
Copy link

rszyma commented Jan 5, 2025

still an issue for me, on latest nightly

@RalfJung
Copy link
Member Author

This works perfectly for me now, and it is absolutely amazing. :) Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants