-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
add note to cargo install --help that says cargo install --vers x.x.x requires =x.x.x to install specific version #3321
Comments
That is, VERS is a semver version range, not an exact version. |
Hm this was intended to be a precise semver version. If we made a mistake and took a range though I guess that ship has sailed... |
@alexcrichton we should double check the behavior but this is what @ducks observed in IRC. |
https://gist.github.com/ducks/12fd804600469a888b4d32c251a44f03 running without the =/range, cargo just seemed to ignore the version |
Yes this was accidentally implemented as a version requirement, not a version itself. Oh well :( |
It seems like this is a thing we should just fix? As long as we can have some kind of nice error message if you try to give it a version requirement it seems fine to do. |
Historically Cargo accidentally took a semver version *requirement*, so let's start issuing warnings about how this is now legacy behavior. Closes rust-lang#3321
I've opened #3338 to fix this behavior. |
Require `cargo install --vers` takes a semver version Historically Cargo accidentally took a semver version *requirement*, so let's start issuing warnings about how this is now legacy behavior. Closes #3321
I actually have a use case for installing a binary using a semver range. If we had semver ranges for binaries, CI scripts could automatically install the latest non-breaking version, benefiting from all the improvements without the risk of breakage. This would reduce manual intervention to only breaking releases instead of every point release. I know this feature still works, so technically I could tell users to use it. But I don't want to push the use of a deprecated feature that could disappear in the future. Do you think this is a valid argument to consider undeprecating this feature? |
@azerupi it seems reasonable to me, yeah! I think we'd just want a new flag for this, like |
Sure, that makes a lot of sense! |
Sure yeah a new issue sounds good, and a PR sounds even better! |
From
cargo install --help
:"Crates from crates.io can optionally specify the version they wish to install
via the
--vers VERS
flags,"Make a note that VERS needs to be in the format
=x.x.x
(equal before version)The text was updated successfully, but these errors were encountered: