Open jonhoo opened 3 years ago
Thanks for the detailed report! I've tried to reproduce this issue but was unable to.
cargo msrv --version
Yeah, it's weird, I only have this issue on this computer.
$ cargo msrv --version
cargo-msrv 0.12.0
$ cargo install cargo-msrv --version 0.10.0
$ cargo msrv
# same error as before
However, I did discover that, weirdly enough,
$ cargo-msrv msrv
work just fine! It's just when invoked through Cargo that it fails.
Digging some deeper, I do have CARGO_TARGET_DIR
set, and I have $CARGO_TARGET_DIR/bin
on my path, so:
$ which -a cargo-msrv
/home/jon/.cargo/bin/cargo-msrv
/home/jon/.cargo-target/release/cargo-msrv
If I execute either of those directly (with the argument msrv
) they both work though, so that seems unrelated.
I don't know why executing through cargo
would make a difference here. It does mean it'll run through Rustup (whereas it won't when run directly as cargo-msrv
), which might change the execution environment (e.g., RUSTUP_HOME
and RUSTUP_TOOLCHAIN
will be set when invoked through cargo
).
It seems that I have the same error on aarch
:
$ cargo msrv --version
cargo-msrv 0.15.1
$ cargo msrv
Fetching index
Determining the Minimum Supported Rust Version (MSRV) for toolchain aarch64-apple-darwin
Using check command cargo check
Unable to install toolchain with `rustup install 1.33.0-aarch64-apple-darwin`.
It is due to the fact that the target didn't existed on the channel before: https://github.com/rust-lang/rustup/issues/2413
If I check for this particular version in the static s3 index with:
aws --no-sign-request s3 ls static-rust-lang-org/dist/ |rg '1\.33\.0-aarch64-apple-darwin'
It finds nothing.
I think it is link to the fact that msrv
is checking the version without checking if the target was supported.
Here we can see that for edition = 2018
it is minimum1.31.0
. But target aarch64-apple-darwin
is supported only for 1.49.0
.
I also think that the subcrate rust-releases
and msrv
are testing for macos through github action runner macos-stable
which is a darwin x86_64
or i686
not an aarch64
.
If we run the same command but targeting x86_64
we find the expected version.
aws --no-sign-request s3 ls static-rust-lang-org/dist/ |rg '1\.33\.0-x86_64-apple-darwin'
I think a fix would be to pass the target when searching for the latest_stable version.
Hi @Freyskeyd, thanks for the detailed report!
I'm currently working on implementing this for the next release. With a bit of luck, it may also help towards fixing #587.
I have the same problem on Mac.
As a workaround, this worked for me:
docker run --platform=linux/amd64 -t -v "$(pwd)/Cargo.toml":/app/Cargo.toml foresterre/cargo-msrv
Although it actually doesn't work because
[Meta] cargo-msrv 0.16.0-beta.18
Compatibility Check #1: Rust 1.37.0
[FAIL] Is incompatible
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ error: failed to read `/app/crates/api/Cargo.toml` โ
โ โ
โ Caused by: โ
โ No such file or directory (os error 2) โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Compatibility Check #2: Rust 1.56.1
[FAIL] Is incompatible
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ error: failed to parse manifest at `/app/Cargo.toml` โ
โ โ
โ Caused by: โ
โ feature `strip` is required โ
โ โ
โ The package requires the Cargo feature called `strip`, but that feature is not stabilized in this version of Cargo (1.56.0 (4ed5d137b 2021-10-04)). โ
โ Consider trying a newer version of Cargo (this may require the nightly release). โ
โ See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-strip-option for more information about the status of this feature. โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Compatibility Check #3: Rust 1.66.1
[FAIL] Is incompatible
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ error: failed to load manifest for workspace member `/app/crates/api` โ
โ โ
โ Caused by: โ
โ failed to read `/app/crates/api/Cargo.toml` โ
โ โ
โ Caused by: โ
โ No such file or directory (os error 2) โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Compatibility Check #4: Rust 1.71.1
[FAIL] Is incompatible
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ error: failed to load manifest for workspace member `/app/crates/api` โ
โ โ
โ Caused by: โ
โ failed to read `/app/crates/api/Cargo.toml` โ
โ โ
โ Caused by: โ
โ No such file or directory (os error 2) โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Compatibility Check #5: Rust 1.73.0
[FAIL] Is incompatible
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ error: failed to load manifest for workspace member `/app/crates/api` โ
โ โ
โ Caused by: โ
โ failed to read `/app/crates/api/Cargo.toml` โ
โ โ
โ Caused by: โ
โ No such file or directory (os error 2) โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Compatibility Check #6: Rust 1.74.1
[FAIL] Is incompatible
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ error: failed to load manifest for workspace member `/app/crates/api` โ
โ โ
โ Caused by: โ
โ failed to read `/app/crates/api/Cargo.toml` โ
โ โ
โ Caused by: โ
โ No such file or directory (os error 2) โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Compatibility Check #7: Rust 1.75.0
[FAIL] Is incompatible
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ error: failed to load manifest for workspace member `/app/crates/api` โ
โ โ
โ Caused by: โ
โ failed to read `/app/crates/api/Cargo.toml` โ
โ โ
โ Caused by: โ
โ No such file or directory (os error 2) โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Result:
Considered (min โฆ max): Rust 0.11.0 โฆ Rust 1.75.0
Search method: bisect
MSRV: N/A
Target: x86_64-unknown-linux-gnu
Unable to find a Minimum Supported Rust Version (MSRV).
If you think this result is erroneous, please run: `cargo check --target x86_64-unknown-linux-gnu` manually.
If the above does succeed, or you think cargo-msrv errored in another way, please feel free to
report the issue at: https://github.com/foresterre/cargo-msrv/issues
Thank you in advance!
Although it's werid that the workspace manifest did work.
I have the same problem on Mac.
As a workaround, this worked for me:
docker run --platform=linux/amd64 -t -v "$(pwd)/Cargo.toml":/app/Cargo.toml foresterre/cargo-msrv
Although it actually doesn't work because
[Meta] cargo-msrv 0.16.0-beta.18 Compatibility Check #1: Rust 1.37.0 [FAIL] Is incompatible โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ error: failed to read `/app/crates/api/Cargo.toml` โ โ โ โ Caused by: โ โ No such file or directory (os error 2) โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ Compatibility Check #2: Rust 1.56.1 [FAIL] Is incompatible โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ error: failed to parse manifest at `/app/Cargo.toml` โ โ โ โ Caused by: โ โ feature `strip` is required โ โ โ โ The package requires the Cargo feature called `strip`, but that feature is not stabilized in this version of Cargo (1.56.0 (4ed5d137b 2021-10-04)). โ โ Consider trying a newer version of Cargo (this may require the nightly release). โ โ See https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-strip-option for more information about the status of this feature. โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ Compatibility Check #3: Rust 1.66.1 [FAIL] Is incompatible โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ error: failed to load manifest for workspace member `/app/crates/api` โ โ โ โ Caused by: โ โ failed to read `/app/crates/api/Cargo.toml` โ โ โ โ Caused by: โ โ No such file or directory (os error 2) โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ Compatibility Check #4: Rust 1.71.1 [FAIL] Is incompatible โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ error: failed to load manifest for workspace member `/app/crates/api` โ โ โ โ Caused by: โ โ failed to read `/app/crates/api/Cargo.toml` โ โ โ โ Caused by: โ โ No such file or directory (os error 2) โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ Compatibility Check #5: Rust 1.73.0 [FAIL] Is incompatible โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ error: failed to load manifest for workspace member `/app/crates/api` โ โ โ โ Caused by: โ โ failed to read `/app/crates/api/Cargo.toml` โ โ โ โ Caused by: โ โ No such file or directory (os error 2) โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ Compatibility Check #6: Rust 1.74.1 [FAIL] Is incompatible โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ error: failed to load manifest for workspace member `/app/crates/api` โ โ โ โ Caused by: โ โ failed to read `/app/crates/api/Cargo.toml` โ โ โ โ Caused by: โ โ No such file or directory (os error 2) โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ Compatibility Check #7: Rust 1.75.0 [FAIL] Is incompatible โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ โ error: failed to load manifest for workspace member `/app/crates/api` โ โ โ โ Caused by: โ โ failed to read `/app/crates/api/Cargo.toml` โ โ โ โ Caused by: โ โ No such file or directory (os error 2) โ โ โ โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ Result: Considered (min โฆ max): Rust 0.11.0 โฆ Rust 1.75.0 Search method: bisect MSRV: N/A Target: x86_64-unknown-linux-gnu Unable to find a Minimum Supported Rust Version (MSRV). If you think this result is erroneous, please run: `cargo check --target x86_64-unknown-linux-gnu` manually. If the above does succeed, or you think cargo-msrv errored in another way, please feel free to report the issue at: [https://github.com/foresterre/cargo-msrv/issues](https://github.com/foresterre/cargo-msrv/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) Thank you in advance!
Although it's werid that the workspace manifest did work.
I was not able to reproduce this. Could you please explain how I can reproduce this?
For some reason,
cargo-msrv
now refuses to run in any project on my computer:This happens both when installing the latest released version of cargo-msrv, and installing directly from the
main
branch.This is particularly weird because when I run the listed command myself, it works without issue:
System info: