-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Keep diagnostics at least until new ones are available #15934
Comments
We clear the check diagnostics here rust-analyzer/crates/rust-analyzer/src/main_loop.rs Lines 640 to 642 in 255eed4
rust-analyzer/crates/rust-analyzer/src/main_loop.rs Lines 489 to 492 in 255eed4
it might just suffice to move the clear away from the |
@rustbot claim |
Hi, I was digging around in the code based on your instructions and a few questions have come up. rust-analyzer/crates/rust-analyzer/src/main_loop.rs Lines 640 to 642 in 255eed4
I have understood, what I'm not sure is where to move the diagnostics clearing. You suggested to add the clearing here rust-analyzer/crates/rust-analyzer/src/main_loop.rs Lines 489 to 492 in 255eed4
which as far as I can tell processes the native diagnostics whereas the previous location handles the flycheck diagnostics.Therefore I wondered if the diagnostics clearing should instead get moved here rust-analyzer/crates/rust-analyzer/src/main_loop.rs Lines 620 to 623 in 255eed4
where the flycheck messages get processed and the diagnostics added. My second question is if you have an idea how to automatically test this behavior or if there is an already existing test. |
Right thats for native ones. The problem with clearing it where you proposed is that if multiple checks are running, we'll clear everything but the last one. I guess the easiest way would be to set a flag in |
Not, I don't think we have any tests for this at all. I'd just say pick a big project (like r-a itself), edit some random crates with errors and check whether things work as expected. |
This is something something I reported first in my text editor (helix) but I was told this is actually rust-analyzer's behavior, and thus can't be fixed there.
I was told this is because:
I'm not all that versed in LSP details, but I guess what I'm asking for is RA not sending that empty list, until it knows that project doesn't have any diagnostics.
This would be a biggest QA improvement in my workflow I can think of.
The text was updated successfully, but these errors were encountered: