rust-lang / rust-lang/rustup

Feature request: `rustup toolchain rename`

Open
#1,299 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

inactive
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating rustup's toolchain command handling and how the toolchain and update-hashes directories are managed. The feature is done when one rename command updates both locations so the renamed toolchain appears in rustup toolchain list and can be uninstalled without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.