-
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
Cannot install rust-analyzer binary if an instance of vscode is already running on Windows #3403
Comments
Yeah, I guess what might do is:
Curious what folks with more windows experience thing about this? Note that on linux you can just overwrite binary of a running program, which makes such updates seamless without any explicit handing. |
Hm, perhaps we should have just two binaries "rust-analyzer", and "rust-analyzer.next", and let the extension to try replace |
@matklad Whatever solution is settled on, I agree that we shouldn't expose more choices to end-users; people really appreciate it when updates just work. To that extent the current "download new rust-analyzer binary" might already be too much interaction. |
Agree with that, but I also think that we shouldn't do http requests without explicit user's action, so I probably don't want to just silently download stuff. |
What about: {
"rust-analyzer.alwaysDownloadThatBinaryNeverAskMeAgain": true
} Anyway, we could just handle that |
3514: vscode: askBeforeDownload option r=matklad a=Veetaha This is a small step towards #3402, also implements my proposal stated in #3403 Also renamed `BinarySource` to `ArtifactSource` in anticipation of nightlies installation that requires downloading not a binary itself but `.vsix` package, thus generalized to `artifact` term. @matklad @lnicola Co-authored-by: Veetaha <gerzoh1@gmail.com>
I noticed that with rust-analyzer 0.2.117 on Windows + Remote SSH to Linux, I no longer get the EBUSY popup notification, it just silently fails when trying to download the binary. I keep vscode running on multiple machines that are sometimes out of reach, so my "get the thing to upgrade" workaround has been to run this on the Linux machine and then ctrl-c out after the launch retries stop:
|
No longer relevant |
Problem
Following up on #3092: I think I figured out what was causing
EBUSY
(in some cases)!So I was prompted with installing the rust-analyzer binary again today, and it kept on failing with
EBUSY
. It then dawned on me: I already had a few VS Code instances open, so could that be what kept it busy? I tried it 4 times, and was prompted withEBUSY
each time.I then closed all running VS Code instances, opened a new instance, and suddenly downloading and installation worked! So I think it's fair to conclude: if VS Code is already running and already using the location the binary would be written to, installation will fail.
Solution
I'm not sure what the solution here is, but there seems to be a general issue around downloading a file into a location that's already in use. Perhaps the solution is to use version the binary name. Perhaps something using fd locks could work? I'm not a Windows expert so I can't say for sure, but a solution is probably in that corner.
Anyway, I hope this is helpful! I ran into this by accident when updating today, and am kind of thrilled that I managed to make it fail reliably!
The text was updated successfully, but these errors were encountered: