Closed pierzchalski closed 2 years ago
Workaround for now:
cargo install rust-script --version "0.7.0"
works as it relies on an older version of clap.
Past that, im not sure why the cargo Sem Version resolver ignores
clap-3.0.0-beta.5
for clap-3.0.0-rc.0
just faced same issue, was hoping for a fix. i wonder, should it depend on non stable version of a crate to begin with?
i think the resolving issue is that in the toml you have:
clap = "3.0.0-beta.5"
which cargo defines by default as ^3.0.0-beta.5 and not =3.0.0-beta.5 so clap-3.0.0-rc.0 is "higher" than clap-3.0.0-beta.5 and still fits the semver. so it takes that. its the correct behavior from cargo point of view but not the one that we should use with unstable release.
Thanks for reporting! The just released 0.19.0 fixes compatibility with and uses the latest clap release candidate, 3.0.0-rc.7.
Hopefully there will be a final release of clap 3 shortly, so we will avoid these kinds of errors in the future.
This is a weird one. I can clone the project and build it locally just fine, but if I try and install it from crates.io with
cargo install rust-script
(or from a local checkout withcargo install --path .
) I get a bunch of errors like the following:Looks like
Cargo.toml
specifiesclap-3.0.0-beta.5
which indeed has theArg::about
method, but as you can see abovecargo install
tries to useclap-3.0.0-rc.0
which does not haveArg::about
. Why would Cargo be doing this? Is there a workaround?