-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Inlay hints multiply when using VSCode action "Rust Analyzer: Restart server" #12836
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
Comments
I'll chime in and say that I'm also experiencing this. It's like "restart" behaves more like "start another." |
odd, I can't reproduce this at all, not the duplication of inlay hints, nor inlay hints not appearing after a reload until i change the file ... |
+1 also had this happen to me recently, but only once and I couldn't make it happen again so I didn't report yet |
I am also experiencing the same issues as @leighmcculloch, I just didn't notice it. |
Just to make sure, how did you install the extension? Actually, what extensions do you have installed? |
I didn't install rust-analyzer manually. It was installed via the vscode extension. |
How did you install the extension? @Heinenen seems to have a recent build, at least of the server binary. |
I see this on macOS for Arm and VS Code 1.69.2 (although I ssh into an x86 Debian machine). |
This is very odd, I'm on VSCode 1.69.2, windows and cannot reproduce it with the latest server. When executing the Restart Server command do the inlay hints stay and a new set appears once restarted, or do the hints disappear and then re-appear duplicated? |
Note that RA runs on the remote side. You should check the version number(s), just in case. |
I am on VSCode 1.69.2, but I've seen this behavior on previous versions too. I switch back and forth between the release and pre-release versions of rust-analyzer, and I'm not 100% confident, but I think I'm only seeing this on the pre-release version of the extension, v0.4.1136. I don't see this behavior on the latest release version of the extension, v.0.3.1131. |
I installed my extension by downloading the .vsix from the marketplace and then installing it inside the Extensions tab inside vscode. |
And I just disabled all the other extension and the bug persists. |
I am also on arm64 Mac, VSCode 1.69.2, extension v0.3.1131 installed from the marketplace |
I installed rust-analyzer on my windows machine and both bugs appear there as well.
One layer of inlay hints disappears and re-appears duplicated (so when restarting for the first time all inlay hints disappear and reappear duplicated). When there are multiple layers of inlay hints, only the "last" layer disappears and is duplicated, the other layers stay. I think the gif I posted shows this behavior too. |
Okay, so I can't reliable produce it but I do get it sometimes, from the looks of it all requests are being duplicated by the client Looks like we end up with two server instances that we serve huh |
so, restarting the server, then changing a file (and saving it, this is the important part) revives the old deactivated client, and the vscode changelogs reveal why
Now that was a pain to debug |
While writing some rust, I restarted the language server with the "Rust Analyzer: Restart server" action and encountered a bug.
My "workflow" to reproduce:
The bug is reproducible for me 100% of the time, even when I wait longer after restarting the language server.
Restarting the server multiple times increases the number of inlay hints multiple times (also seen in gif).
rust-analyzer version: 0.4.1132-standalone (567a5e9 2022-07-18)
rustc version: rustc 1.62.0 (a8314ef7d 2022-06-27)
PS: When using the "Developer: Reload window" action, the inlay hints don't show up at all unless I change something in the file (with or without saving it). If you think that is worth another issue, I can file one for that as well.
The text was updated successfully, but these errors were encountered: