rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Diagnostics are called twice

Open ChayimFriedman2 opened this issue 11 months ago • 3 comments

Once for assists (quickfixes) and the other for diagnostics.

We can fix this locally by caching the diagnostics of the last file, or globally by making diagnostics queries. I believe a global solution is required anyway, since we want to run diagnostics for the whole workspace (perhaps only on save) eventually.

ChayimFriedman2 avatar Jan 21 '25 20:01 ChayimFriedman2

I'm getting the same thing I think, see screenshot below. Though if you look at the columns for each one they both say column 52 but one of them also says column 77 (where the closing paranthesis is). But I get these duplicate messages constantly for everything. I don't think it ever shows me just a single message without anything else being there interestingly enough. Not super annoying but a little.

Image

G0rocks avatar May 23 '25 17:05 G0rocks

I'm getting the same thing I think, see screenshot below. Though if you look at the columns for each one they both say column 52 but one of them also says column 77 (where the closing paranthesis is). But I get these duplicate messages constantly for everything. I don't think it ever shows me just a single message without anything else being there interestingly enough. Not super annoying but a little.

Image

What you're experiencing is an unrelated bug. Chayim is referring to rust-analyzer's native diagnostics, but the diagnostics you're seeing are from rustc by way of Cargo.

davidbarsky avatar May 23 '25 17:05 davidbarsky

I'm getting the same thing I think, see screenshot below. Though if you look at the columns for each one they both say column 52 but one of them also says column 77 (where the closing paranthesis is). But I get these duplicate messages constantly for everything. I don't think it ever shows me just a single message without anything else being there interestingly enough. Not super annoying but a little. Image

What you're experiencing is an unrelated bug. Chayim is referring to rust-analyzer's native diagnostics, but the diagnostics you're seeing are from rustc by way of Cargo.

Ah ok. Didn't realize. Made a sperate issue #19874

G0rocks avatar May 27 '25 19:05 G0rocks