-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
stale diagnostic after panic #18732
Comments
When some obviously-not-syntax-error reports a SyntaxError, that usually happens in my experience after the diagnostics request has panicked. So, did you saw a popup about the server panicking before? |
I don't recall one, but the subtle corner popups in vscode rarely attract my eyeballs. I can see this in the RA LSP output:
But I don't know if its connected. I have restarted the LSP but the problem remained. |
Yes this means there was a panic in diagnostics. Restarting rust-analyzer should work unless it panics again. |
Its definitely a bug that a panic there can cause us to leak (never clear) diagnostics |
I think this is because the diagnostics request is not wrapped in |
Ah right, I was looking at the push model style diagnostic handling, not the pull one that is actually being used. So this smells like a VSCode issue to me (though that is not confirmed). We do set an id for our pull diagnostics now though, so maybe that makes a difference (next release) |
Very weird - basic code reporting a Syntax error, but it runs fine via Cargo run :)
rust-analyzer version: rust-analyzer version: 0.3.2220-standalone (27e824f 2024-12-15) [c:\Users\robertc.vscode\extensions\rust-lang.rust-analyzer-0.3.2220-win32-x64\server\rust-analyzer.exe]
rustc version: rustc 1.83.0 (90b35a623 2024-11-26)
editor or extension: VSCode Version 0.3.2220
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTC
,RUSTUP_HOME
orCARGO_HOME
)code snippet to reproduce:
Reports these problems:
and
The text was updated successfully, but these errors were encountered: