Rustup: Confusion between rustup version and rustc version

Created on 5 Aug 2020  路  5Comments  路  Source: rust-lang/rustup

Rustup has reached version 1.22, which is high enough that it starts to look like an old rustc version.

To people who are just starting with Rust, it can be confusing. If someone is told they need "Rust 1.31" and they run rustup --version, they may think they've got an outdated version of Rust.

I see a couple of ways to improve this situation:

  • Bump rustup's version to track rustc version (e.g. Cargo does this). I know rustup isn't tied to rustc version, so these two could be out of sync, but rustup update updates itself too, so they should stay more or less in sync in typical usage.

  • Make rustup --version also display rustc --version

fixed-next-release

Most helpful comment

Strawman proposal for a simple fix: Overwrite the output for --verbose to something like

$ rustup --version
rustup 1.23.0 (8932b2fcf 2020-09-20)
NOTE: This is the version for the rustup toolchain manager, not the rustc compiler.
NOTE: The currently active rustc version is `rustc 1.42.0 (b8cedc004 2020-03-09)`

(where the last part is calling out to rustc --version.)

All 5 comments

Currently --version is handled by clap I guess we could perhaps just turn it from --version being handled by clap into treating it more like rustup show perhaps?

I've added the help-wanted label because I'd like to see ideas of nice ways to make this less confusing for people without needing to do a rustup release on every rust release just to keep numbers "aligned"

Strawman proposal for a simple fix: Overwrite the output for --verbose to something like

$ rustup --version
rustup 1.23.0 (8932b2fcf 2020-09-20)
NOTE: This is the version for the rustup toolchain manager, not the rustc compiler.
NOTE: The currently active rustc version is `rustc 1.42.0 (b8cedc004 2020-03-09)`

(where the last part is calling out to rustc --version.)

Yes, that'd be a nice halfway house between the current output and a full on rustup show perhaps.

Rustup 1.23.0 is now out.

Was this page helpful?
0 / 5 - 0 ratings