Skip to content
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

rustup self update fails when RLS using IDE's are open on Windows #1865

Closed
rbtcollins opened this issue May 22, 2019 · 3 comments
Closed

rustup self update fails when RLS using IDE's are open on Windows #1865

rbtcollins opened this issue May 22, 2019 · 3 comments
Labels

Comments

@rbtcollins
Copy link
Contributor

rbtcollins commented May 22, 2019

Problem
rustup.exe cannot be replaced when an IDE that uses RLS is open on Windows

Steps

  1. Install rustup
  2. Install vscode
  3. Work on a rust project
  4. run rustup some time later and get an error about rustup.exe permission denied

Possible Solution(s)
Suggest having a handof/respawn protocol for the proxies so they can be told to GTFO when rustup.exe needs to be replaced.

Proxies should have a file that they look for on disk, which if found, they immediately exit with error. E.g. ~/.rustup/self-updating. We should advise IDEs etc to deal with exiting servers with a few 10's of ms delay - or that they can look for this file and wait for it to be removed before they try to run the command again.

rustup should then kill the proxies reasonably gracefully during update:

  1. write the file
  2. try the rename
  3. look for processes
  4. wait p90? p95? for the rustc/fmt/docs etc processes to have a decent chance of cleanly exiting
  5. perhaps prompt the user for (kill/wait)
  6. kill any with rls or other server style children unless the user has cleanly exited the server
  7. loop on 3
  8. do the update
  9. remove the file

Notes

Output of rustup --version:
Output of rustup show:

@rbtcollins rbtcollins added the bug label May 22, 2019
@rbtcollins rbtcollins changed the title rustup self update fails when RLS using IDE's are open on Windwos rustup self update fails when RLS using IDE's are open on Windows May 22, 2019
@kinnison
Copy link
Contributor

If we rename() the old proxies out of the way before trying to delete them, and then opportunistically silently try to unlink() old proxy names whenever we encounter them, this ought to be a fairly rare event. How does that sound?

@workingjubilee
Copy link
Contributor

@rustbot label: +O-windows

@rustbot rustbot added the O-windows Windows related label Apr 29, 2021
@rbtcollins
Copy link
Contributor Author

#2441 is more comprehensive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants