rust-lang / rust-lang/rustup

Nightly toolchain version is off by one

Open
#3,455 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Problem

I have a host A and a host B. Host A has rust installed. Host B - not. I decided to install on host B the same rust version host A has. So I typed this on host A:

$ rustc --version
rustc 1.72.0-nightly (e6d4725c7 2023-06-05)

Then I copied 2023-06-05 from output above and typed this to host B:

# curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain nightly-2023-06-05
info: downloading installer
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for 'nightly-2023-06-05-x86_64-unknown-linux-gnu'
info: latest update on 2023-06-05, rust version 1.72.0-nightly (101fa903b 2023-06-04)
info: downloading component 'cargo'
  7.0 MiB /   7.0 MiB (100 %)   1.0 MiB/s in 12s ETA:  0s
info: downloading component 'clippy'
  2.4 MiB /   2.4 MiB (100 %)   1.0 MiB/s in  4s ETA:  0s
info: downloading component 'rust-docs'
 13.6 MiB /  13.6 MiB (100 %)   1.0 MiB/s in 20s ETA:  0s
info: downloading component 'rust-std'
 26.4 MiB /  26.4 MiB (100 %)   1.0 MiB/s in 43s ETA:  0s
info: downloading component 'rustc'
 63.7 MiB /  63.7 MiB (100 %)   1.0 MiB/s in  1m 47s ETA:  0s 
info: downloading component 'rustfmt'
  2.3 MiB /   2.3 MiB (100 %)   1.0 MiB/s in  4s ETA:  0s
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 13.6 MiB /  13.6 MiB (100 %)   1.6 MiB/s in 10s ETA:  0s
info: installing component 'rust-std'
 26.4 MiB /  26.4 MiB (100 %)  11.2 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 63.7 MiB /  63.7 MiB (100 %)  12.2 MiB/s in  5s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'nightly-2023-06-05-x86_64-unknown-linux-gnu'

  nightly-2023-06-05-x86_64-unknown-linux-gnu installed - rustc 1.72.0-nightly (101fa903b 2023-06-04)


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source "$HOME/.cargo/env"
# source "$HOME/.cargo/env"
# rustc --version
rustc 1.72.0-nightly (101fa903b 2023-06-04)

As you can see original version (rustc 1.72.0-nightly (e6d4725c7 2023-06-05)) differs from host B's version (rustc 1.72.0-nightly (101fa903b 2023-06-04)).

So, something really wrong happens here. I don't know whether there is a bug in rustup itself or just in documentation

Steps
Possible Solution(s)

No response

Notes

No response

Rustup version
-
Installed toolchains
-

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

Reproduce the two rustc and rustup installation commands from the report, then trace how rustup resolves nightly dates and selects the downloaded toolchain. Check the relevant rustup tests or entry points for date resolution and installation output; done means the mismatch is reproduced and either corrected or documented with a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.