Skip to content

Clarification needed on error message when some components are unavailable during rustup update #1600

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mqudsi opened this issue Jan 5, 2019 · 9 comments

Comments

@mqudsi
Copy link

mqudsi commented Jan 5, 2019

When running rustup update on a toolchain which has components installed which are unavailable in the newest version of the toolchain in question, the error message given is buried among the output. Recent versions of rustup display a longer more complete message but it is perhaps not sufficient.


Original summary follows

I was unable to upgrade from my installed nightly-msvc to the latest nightly-msvc without an errors. The following is the only output that I received:

D:\>rustup --version
rustup 1.16.0 (beab5ac2b 2018-12-06)

D:\>rustup update
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2019-01-05, rust version 1.33.0-nightly (f381a9625 2019-01-04)
error: some components unavailable for download: 'rls', 'clippy'
info: checking for self-updates

  nightly-x86_64-pc-windows-msvc update failed - rustc 1.29.0-nightly (6a1c0637c 2018-07-23)

I was forced to run rustup toolchain remove nightly-msvc followed by rustup toolchain install nightly-msvc which succeeded without any issues:

D:\>rustup toolchain install nightly-msvc
info: syncing channel updates for 'nightly-x86_64-pc-windows-msvc'
info: latest update on 2019-01-05, rust version 1.33.0-nightly (f381a9625 2019-01-04)
info: downloading component 'rustc'
 57.8 MiB /  57.8 MiB (100 %)  54.5 MiB/s ETA:   0 s
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
@Thomasdezeeuw
Copy link

I think I've hit the same (or similar) issue on macOS.

info: syncing channel updates for 'nightly-x86_64-apple-darwin'
info: latest update on 2019-01-06, rust version 1.33.0-nightly (68fe5182c 2019-01-05)
error: some components unavailable for download: 'clippy', 'rls'
info: checking for self-updates

       stable-x86_64-apple-darwin unchanged - rustc 1.31.1 (b6c32da9b 2018-12-18)
           beta-x86_64-apple-darwin updated - rustc 1.32.0-beta.12 (2bde39b8e 2019-01-05)
  nightly-x86_64-apple-darwin update failed - rustc 1.33.0-nightly (14b96659e 2018-12-25)

@leinlawun
Copy link

Same on Linux.

$ rustup -V
rustup 1.16.0 (beab5ac2b 2018-12-06)
$ rustup -v update 
verbose: read metadata version: '12'
verbose: updating existing install for 'nightly-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
verbose: creating temp file: ~/.rustup/tmp/gp7ypkyzyal_bv9x_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-nightly.toml.sha256'
verbose: downloading with curl
verbose: deleted temp file: ~/.rustup/tmp/gp7ypkyzyal_bv9x_file
verbose: creating temp file: ~/.rustup/tmp/2alhd062eqqu_65u_file.toml
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-nightly.toml'
verbose: downloading with curl
verbose: checksum passed
verbose: deleted temp file: ~/.rustup/tmp/2alhd062eqqu_65u_file.toml
info: latest update on 2019-01-06, rust version 1.33.0-nightly (68fe5182c 2019-01-05)
error: some components unavailable for download: 'rls', 'clippy'
info: checking for self-updates

  nightly-x86_64-unknown-linux-gnu update failed - rustc 1.33.0-nightly (a7be40c65 2018-12-26)

$ rustup -v uninstall nightly
verbose: read metadata version: '12'
info: uninstalling toolchain 'nightly-x86_64-unknown-linux-gnu'
verbose: removing install directory: '~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu'
info: toolchain 'nightly-x86_64-unknown-linux-gnu' uninstalled

$ rustup -v install nightly
verbose: read metadata version: '12'
verbose: installing toolchain 'nightly-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
verbose: creating temp file: ~/.rustup/tmp/ieao7engkj63_ypd_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-nightly.toml.sha256'
verbose: downloading with curl
verbose: deleted temp file: ~/.rustup/tmp/ieao7engkj63_ypd_file
verbose: no update hash at: '~/.rustup/update-hashes/nightly-x86_64-unknown-linux-gnu'
verbose: creating temp file: ~/.rustup/tmp/yz6f2rmeyxfn5q3l_file.toml
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-nightly.toml'
verbose: downloading with curl
verbose: checksum passed
verbose: deleted temp file: ~/.rustup/tmp/yz6f2rmeyxfn5q3l_file.toml
info: latest update on 2019-01-06, rust version 1.33.0-nightly (68fe5182c 2019-01-05)
info: downloading component 'rustc'
verbose: downloading file from: 'https://static.rust-lang.org/dist/2019-01-06/rustc-nightly-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with curl
 82.2 MiB /  82.2 MiB (100 %)   8.4 MiB/s ETA:   0 s                
verbose: checksum passed
info: downloading component 'rust-std'
verbose: downloading file from: 'https://static.rust-lang.org/dist/2019-01-06/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with curl
 57.0 MiB /  57.0 MiB (100 %)   9.9 MiB/s ETA:   0 s                
verbose: checksum passed
info: downloading component 'cargo'
verbose: downloading file from: 'https://static.rust-lang.org/dist/2019-01-06/cargo-nightly-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with curl
verbose: checksum passed
info: downloading component 'rust-docs'
verbose: downloading file from: 'https://static.rust-lang.org/dist/2019-01-06/rust-docs-nightly-x86_64-unknown-linux-gnu.tar.xz'
verbose: downloading with curl
verbose: checksum passed
info: installing component 'rustc'
verbose: creating temp directory: ~/.rustup/tmp/p1l0z8raea19xc_n_dir
verbose: deleted temp directory: ~/.rustup/tmp/p1l0z8raea19xc_n_dir
info: installing component 'rust-std'
verbose: creating temp directory: ~/.rustup/tmp/apyeq_fjehc9ydax_dir
verbose: creating temp file: ~/.rustup/tmp/oj8py6c_m3f5dfik_file
verbose: creating temp file: ~/.rustup/tmp/hxpnv8bu99aj_u_1_file
verbose: deleted temp directory: ~/.rustup/tmp/apyeq_fjehc9ydax_dir
info: installing component 'cargo'
verbose: creating temp directory: ~/.rustup/tmp/5jh7c5thh6ub2v_s_dir
verbose: creating temp file: ~/.rustup/tmp/bnjq6jc7x0zc8r1q_file
verbose: creating temp file: ~/.rustup/tmp/i5jq_pzid_f17c8k_file
verbose: deleted temp directory: ~/.rustup/tmp/5jh7c5thh6ub2v_s_dir
info: installing component 'rust-docs'
verbose: creating temp directory: ~/.rustup/tmp/6fyi2_bp8fg_fs7a_dir
verbose: creating temp file: ~/.rustup/tmp/llq4d2aeca07pu55_file
verbose: creating temp file: ~/.rustup/tmp/ucmukp5ujd3_ocw9_file
verbose: deleted temp directory: ~/.rustup/tmp/6fyi2_bp8fg_fs7a_dir
verbose: deleted temp file: ~/.rustup/tmp/oj8py6c_m3f5dfik_file
verbose: deleted temp file: ~/.rustup/tmp/hxpnv8bu99aj_u_1_file
verbose: deleted temp file: ~/.rustup/tmp/bnjq6jc7x0zc8r1q_file
verbose: deleted temp file: ~/.rustup/tmp/i5jq_pzid_f17c8k_file
verbose: deleted temp file: ~/.rustup/tmp/llq4d2aeca07pu55_file
verbose: deleted temp file: ~/.rustup/tmp/ucmukp5ujd3_ocw9_file
verbose: toolchain 'nightly-x86_64-unknown-linux-gnu' installed

  nightly-x86_64-unknown-linux-gnu installed - rustc 1.33.0-nightly (68fe5182c 2019-01-05)

$ rustup -v component list
verbose: read metadata version: '12'
cargo-x86_64-unknown-linux-gnu (default)
llvm-tools-preview-x86_64-unknown-linux-gnu
rust-analysis-x86_64-unknown-linux-gnu
rust-docs-x86_64-unknown-linux-gnu (default)
rust-src
rust-std-aarch64-apple-ios
rust-std-aarch64-fuchsia
rust-std-aarch64-linux-android
rust-std-aarch64-pc-windows-msvc
rust-std-aarch64-unknown-cloudabi
rust-std-aarch64-unknown-linux-gnu
rust-std-aarch64-unknown-linux-musl
rust-std-arm-linux-androideabi
rust-std-arm-unknown-linux-gnueabi
rust-std-arm-unknown-linux-gnueabihf
rust-std-arm-unknown-linux-musleabi
rust-std-arm-unknown-linux-musleabihf
rust-std-armebv7r-none-eabi
rust-std-armebv7r-none-eabihf
rust-std-armv5te-unknown-linux-gnueabi
rust-std-armv5te-unknown-linux-musleabi
rust-std-armv7-apple-ios
rust-std-armv7-linux-androideabi
rust-std-armv7-unknown-linux-gnueabihf
rust-std-armv7-unknown-linux-musleabihf
rust-std-armv7r-none-eabi
rust-std-armv7r-none-eabihf
rust-std-armv7s-apple-ios
rust-std-asmjs-unknown-emscripten
rust-std-i386-apple-ios
rust-std-i586-pc-windows-msvc
rust-std-i586-unknown-linux-gnu
rust-std-i586-unknown-linux-musl
rust-std-i686-apple-darwin
rust-std-i686-linux-android
rust-std-i686-pc-windows-gnu
rust-std-i686-pc-windows-msvc
rust-std-i686-unknown-freebsd
rust-std-i686-unknown-linux-gnu
rust-std-i686-unknown-linux-musl
rust-std-mips-unknown-linux-gnu
rust-std-mips-unknown-linux-musl
rust-std-mips64-unknown-linux-gnuabi64
rust-std-mips64el-unknown-linux-gnuabi64
rust-std-mipsel-unknown-linux-gnu
rust-std-mipsel-unknown-linux-musl
rust-std-powerpc-unknown-linux-gnu
rust-std-powerpc64-unknown-linux-gnu
rust-std-powerpc64le-unknown-linux-gnu
rust-std-riscv32imac-unknown-none-elf
rust-std-riscv32imc-unknown-none-elf
rust-std-s390x-unknown-linux-gnu
rust-std-sparc64-unknown-linux-gnu
rust-std-sparcv9-sun-solaris
rust-std-thumbv6m-none-eabi
rust-std-thumbv7em-none-eabi
rust-std-thumbv7em-none-eabihf
rust-std-thumbv7m-none-eabi
rust-std-thumbv7neon-linux-androideabi
rust-std-thumbv7neon-unknown-linux-gnueabihf
rust-std-wasm32-unknown-emscripten
rust-std-wasm32-unknown-unknown
rust-std-x86_64-apple-darwin
rust-std-x86_64-apple-ios
rust-std-x86_64-fuchsia
rust-std-x86_64-linux-android
rust-std-x86_64-pc-windows-gnu
rust-std-x86_64-pc-windows-msvc
rust-std-x86_64-rumprun-netbsd
rust-std-x86_64-sun-solaris
rust-std-x86_64-unknown-cloudabi
rust-std-x86_64-unknown-freebsd
rust-std-x86_64-unknown-linux-gnu (default)
rust-std-x86_64-unknown-linux-gnux32
rust-std-x86_64-unknown-linux-musl
rust-std-x86_64-unknown-netbsd
rust-std-x86_64-unknown-redox
rustc-x86_64-unknown-linux-gnu (default)
rustfmt-x86_64-unknown-linux-gnu

RLS and Clippy are not listed. Please fix it.

@NickeZ
Copy link
Contributor

NickeZ commented Jan 8, 2019

IMO the correct behavior here is to download to the latest possible version and then print a warning that it isn't the latest nightly, but instead the latest nightly with all the components requested.

I was also very surprised by this error and if this would happen while showing off rust to a colleague it would give a very bad impression.

@pronebird
Copy link

I agree with @NickeZ. Would it be possible to make rustup open the web page like https://mexus.github.io/rustup-components-history/x86_64-pc-windows-msvc.html and figure out which version satisfies the upgrade requirements and just upgrade to that version?

@kinnison kinnison changed the title rustup nightly-msvc update failure Clarification needed on error message when some components are unavailable during rustup update May 9, 2019
@kinnison
Copy link
Contributor

kinnison commented May 9, 2019

I have updated the title and the top of the summary post to make it clear that this is about how we communicate when a toolchain cannot be updated because components are installed which are missing from the newer version of the toolchain.

We now have TOOLSTATE_MSG which is output in these situations, providing output akin to:

If you require these components, please install and use the latest successful build version,
which you can find at https://rust-lang-nursery.github.io/rust-toolstate.

After determining the correct date, install it with a command such as:
     rustup toolchain install nightly-2018-12-27
Then you can use the toolchain with commands such as:
     cargo +nightly-2018-12-27 build

If this is sufficient, then we can close this issue, otherwise we should consider what sufficient correct behaviour would be.

@NickeZ
Copy link
Contributor

NickeZ commented May 9, 2019

I can't determine neither from https://rust-lang-nursery.github.io/rust-toolstate/ nor https://rust-lang.github.io/rustup-components-history/ which is the latest version of rust that has all the components.

I think the new title of this issue is wrong. The issue is that rustup doesn't update to the latest nightly with all the components when I issue rustup update.

Edit: At the very least, the error message could suggest exactly which nightly to download.

@kinnison
Copy link
Contributor

kinnison commented May 9, 2019

@NickeZ Your request is covered by #1628

@NickeZ
Copy link
Contributor

NickeZ commented May 9, 2019

Ah, ok, then I'll watch that issue instead. Thanks

@kinnison
Copy link
Contributor

I believe that the finally decided-upon functionality has now been released in 1.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants