-
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
vscode freezes when trying to apply clippy suggestion #1713
Comments
@matthiaskrgr Are you still encountering this issue on the latest rust-analyzer? |
Right now vscode only freezes for around 10 seconds before applying the suggestion |
Could you try settings the env variable |
The "Ouput" where it also says "Problems", "Debug Console" and "Terminal"? I couldn't get anything to show up there. :/
|
Yeah, that one. It has a drop-down out in the right side where you should be able to select |
I can see
but that's from before I tried to apply the clippy suggestion and applying the suggestion does not add any additional output, hmm... I found this though:
|
Ahh, you are probably using a rust-analyzer from before #2668 which majorly changed how we do cargo check. Updating might fix your issue, but should at least make it easier to debug. |
No, I'm updating ra almost daily.
using |
Ahh, it seems running with RA_PROFILE is a little more complicated than i thought, with regards to getting it to output the data. I will investigate further and return with a good way to diagnose the issue :) |
Okay, if you add |
output:
|
The codeAction seems to get run in 4.4ms which is around what I'd expect. I'm not really sure where to take it from here, as it seems like an issue with VSCode or your computer/OS. Maybe an issue on VSCode can bring more light on the issue? |
Is this the "convert to guarded return" fix? I can't reproduce this on windows. Are you still on vscode 1.37.1 or are you on the latest stable 1.41.1? |
@kjeremy You have to explicitly run clippy instead of check to get the diagnostic in question, not that the diagnostic itself should change much |
Yeah I did that and get the diagnostic but do not have an option to apply the suggestion. |
it's about the collapsible_if lint |
@matthiaskrgr Yes but I never get the option to apply the hint (though it is highlighted in my editor). |
It works just fine for me. Clippy called the suggestion
Edit: opened rust-lang/rust-clippy#5732 |
I could not notice any delay now, closing the issue. |
code
when trying to apply the clippy::collapsible_if fix hint via the rla plugin, vscode freezes with 100% cpu load.
rla @ 5fd9a5b
code
The text was updated successfully, but these errors were encountered: