rust-lang / cargo-bisect-rustc

Bisects rustc, either nightlies or CI artifacts
https://rust-lang.github.io/cargo-bisect-rustc/
Apache License 2.0
178 stars 55 forks source link

UnexpectedVersionFormat installing nightly-2020-10-23 #126

Closed Michael-F-Bryan closed 8 months ago

Michael-F-Bryan commented 3 years ago

While troubleshooting rust-lang/rust#81221 I ran into a panic in cargo-bisect-rust where it encountered a UnexpectedVersionFormat error while installing nightly-2020-10-23.

$ cargo bisect-rustc --preserve --start 2020-07-27 --verbose -- build
installing nightly-2020-07-27
testing...
RESULT: nightly-2020-07-27, ===> No

installing nightly-2021-01-19
testing...
RESULT: nightly-2021-01-19, ===> Yes

installing nightly-2020-10-23
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnexpectedVersionFormat', /home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-bisect-rustc-0.6.0/src/toolchains.rs:91:58
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The annoying part is that I tried to run it again with RUST_BACKTRACE=1, and installing nightly-2020-10-23 completed without an issue.

cormacrelf commented 3 years ago

For me this was because of something attempting to read my rust-toolchain.toml, which had an invalid channel name in it.

ehuss commented 8 months ago

Closing as I believe this is essentially resolved by #152. I'm uncertain what the exact circumstances that lead to the above error, so it is difficult to reproduce. However, as of that PR, it will ignore nightly if it can't determine the version from it (perhaps it somehow was a dev version?).