rust-lang / rust-lang/rustup

Updatable toolchain aliases

Open
#1,556 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I commonly work with pinned nightlies in projects that require extra components installed, updating the pinned date in one of these projects is a lot of work since I need to find a new nightly that has all the components available. One idea I had to solve this would be to have a sort of local "channel" alias that I can manually update to the latest release of different upstream channels, and have this update use the normal check for all required compenents that happens with channels like nightly.

I think the easiest way to fully explain this would be an example of how I would expect a CLI interaction with this feature to go:

> rustup toolchain add foobar=nightly-2018-10-31
info: syncing channel updates for 'nightly-2018-10-31-x86_64-apple-darwin'
info: latest update on 2018-10-31, rust version 1.31.0-nightly (1cf82fd9c 2018-10-30)
[...]

  foobar installed - rustc 1.31.0-nightly (1cf82fd9c 2018-10-30)

> rustup component add --toolchain foobar clippy
info: downloading component 'clippy'
info: installing component 'clippy'

> rustup update foobar=nightly-2018-11-28
info: syncing channel updates for 'nightly-2018-11-28-x86_64-apple-darwin'
warning: component 'clippy' is not available anymore on target 'x86_64-apple-darwin'
error: some components unavailable for download: 'clippy'

  foobar update failed - rustc 1.31.0-nightly (1cf82fd9c 2018-10-30)

> rustup update foobar=nightly-2018-11-30
info: syncing channel updates for 'nightly-2018-11-30-x86_64-apple-darwin'
info: latest update on 2018-11-30, rust version 1.32.0-nightly (3e90a12a8 2018-11-29)
[...]

  foobar updated - rustc 1.32.0-nightly (3e90a12a8 2018-11-29)

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 CLI flows shown for rustup toolchain add, rustup component add --toolchain, and rustup update, then inspect how channel names and pinned dates are resolved. The feature is done when a local alias can be created, manually updated to a specified upstream channel, and updates preserve the installed components by rejecting releases where required components are unavailable.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.