rust-lang / rust-lang/rustup

Branch channel toolchains on update

Open
#715 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It would be nice if there was a way to have rustup automatically branch channel toolchains on update.

What I mean by this is that when I update stable and go from (say) 1.11.0 to 1.12.0, I'd like rustup to automatically rename the current stable-* toolchain to 1.11.0-*, and then install a fresh 1.12.0 compiler in stable-*. This would also be useful for nightlies where I've written something depending on the specific compiler, and want to pin it to a particular version for now.

Currently, I do this by hand by very carefully not running rustup update until I've manually checked to see if there is an update, and if there is, renaming the toolchain directory, and then updating. If I mess up on stable, I need to re-download the entire toolchain that I already had moments before. If I mess up on nightly... well now I need to try and work out what version I had installed in the first place.

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 tracing the rustup update command and its channel toolchain handling, then review how toolchain directories are renamed or installed. The behavior is complete when updating a channel preserves the previous compiler under its exact version and installs the new compiler under the channel name, including nightly toolchains.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.