rustup show fails with panic on Windows

Created on 6 Jul 2018  路  10Comments  路  Source: rust-lang/rustup

See also (closed) issue #1357 (which I cannot seem to re-open). This is the latest rustup (downloaded 7/1/2018). I get a panic with rustup show on Windows 10 after successful install of rust.

>rustup show
Default host: i686-pc-windows-msvc

installed toolchains
--------------------

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\libcore\option.rs:335:20
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Other commands work.

>rustup update
info: syncing channel updates for 'stable-i686-pc-windows-msvc'
info: syncing channel updates for 'nightly-i686-pc-windows-msvc'
info: checking for self-updates

   stable-i686-pc-windows-msvc unchanged - rustc 1.27.0 (3eda71b00 2018-06-19)
  nightly-i686-pc-windows-msvc unchanged - rustc 1.28.0-nightly (e3bf634e0 2018-06-28)

Have repeated and confirmed that the problems seems to be the lack of a default toolchain.

Most helpful comment

Rustup doesn't get stuck at installing component 'rust-docs' but it takes a lot time because of NTFS https://github.com/rust-lang/rustup.rs/issues/1540.

All 10 comments

Interesting, it should not be easy to get in a situation where there is no default toolchain. What steps did you take to get to that point? Also what is the contents of your ~/.rustup/settings.toml file?

I'm hitting this and #1436. I tried using rustup-init.exe which got stuck at the installing component 'rust-docs'. Both rustup update and rustup toolchain install get stuck there.

~/.rustup/settings.toml:

default_host_triple = "x86_64-pc-windows-msvc"
telemetry = false
version = "12"

[overrides]

rustup default stable-x86_64-pc-windows-msvc fixed it for me

Rustup doesn't get stuck at installing component 'rust-docs' but it takes a lot time because of NTFS https://github.com/rust-lang/rustup.rs/issues/1540.

which got stuck at the installing component 'rust-docs'

Rustup doesn't get stuck at installing component 'rust-docs' but it takes a lot time because of NTFS

I reported added a progress bar to component installs to help solve this very case (#1557)

I hit this just now after installing rustup via scoop. My settings.toml is the same as the previous comment's. When I run rustup default stable-x86_64-pc-windows-msvc, I get:

> rustup default stable-x86_64-pc-windows-msvc
?[1minfo: ?[0musing existing install for 'stable-x86_64-pc-windows-msvc'
?[1minfo: ?[0mdefault toolchain set to 'stable-x86_64-pc-windows-msvc'

  ?[1mstable-x86_64-pc-windows-msvc unchanged?[0m - rustc 1.32.0 (9fda7c223 2019-01-16)

This is after a little bit of thrashing, doing rustup install stable and rustup install 1.32.0 and having _both_ do something even though I would think that stable would resolve to 1.32.0 right now.

It seems to work now, for reasons I don't comprehend. I'm able to cargo build.

So I think this should be broken into two problems:

I propose that we reopen 1450, fix that because its clear and simple, fix it (with the case that no default results in a link to this ticket), and then try to figure out the sporadic failure to have a default here)

We've not panic!()d on a lack of default toolchain for a few releases now, instead you get a well-formed error: no default toolchain configured though perhaps we could then offer a hint on how to fix that.

Regarding why there's no default toolchain, I'm not sure, so we can proceed with investigating that on this issue.

I'm not sure that this has been reproduced in the past 6 months. Does anyone have any way to reproduce this which they've not shared yet?

Oops, mis-clicked

Was this page helpful?
0 / 5 - 0 ratings