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

Feature request: rustup toolchain rename #1299

Open
ketsuban opened this issue Dec 4, 2017 · 7 comments
Open

Feature request: rustup toolchain rename #1299

ketsuban opened this issue Dec 4, 2017 · 7 comments
Labels

Comments

@ketsuban
Copy link

ketsuban commented Dec 4, 2017

This may be a bit niche but...

I was hit by the most recent nightly not including the RLS and had to downgrade, but I wanted to retain the name nightly (rather than nightly-2017-11-30). This turned out to need two different folders to be renamed:

$RUSTUP_HOME/toolchains/<toolchain> - so it'll show up as e.g. nightly-x86_64-pc-windows-msvc in rustup toolchain list.
$RUSTUP_HOME/update-hashes/<toolchain> - I initially installed nightly-2017-12-02, but that's the one that doesn't have the RLS! Trying to rustup toolchain uninstall it got me an error because I hadn't renamed this folder.

A single rustup command such as rustup toolchain rename could do this without needing me to know anything about the structure of $RUSTUP_HOME.

@yuyoyuppe
Copy link

Just stumbled upon this, and here's an easy fix - you can specify rust-client.rlsPath option in VSCode settings.json, e.g.:

"rust-client.rlsPath": "C:\Users\yuyoyuppe\.rustup\toolchains\nightly-2019-07-19-x86_64-pc-windows-msvc\bin\rls.exe"

@ketsuban
Copy link
Author

I could also just have set my override to nightly-2017-12-02 rather than nightly; the problem was I wanted a specific nightly build but didn't want it to be permanently tagged with the date, so that later on I can update to a newer nightly if I want.

@kinnison
Copy link
Contributor

There are a number of different solutions to the same sort of problem you describe in the original posting on this issue. We're not yet sure which we're going to take, so thank you for your suggestion, but I'm not able to say if it's something we're likely to merge yet.

@kinnison
Copy link
Contributor

With Rustup 1.20 this situation should hopefully be less likely to occur. Is that sufficient to solve your problem or do you still want this feature as well?

@kinnison
Copy link
Contributor

kinnison commented Dec 3, 2020

Is it okay if I close this?

@JoshLind
Copy link

FYI, this is still very much needed 😄 e.g., see: #3390

@rbtcollins
Copy link
Contributor

I think with some safeguards this could be done.

Specifically: renaming a toolchain should check the toolchain is compatible with the new name.

stable -> specific version should check the version
nightly/beta/otherchannelsinfuture/custom -> specific version should error
any channel -> same-channel-date-based should check the date if possible, or we should prohibit it
any-channel-date-based-> same-channel-unqualified is ok
specific version -> stable is ok

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

5 participants