Skip to content
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

Cloning Specific Version from Crates.io #17

Closed
iwillspeak opened this issue Jul 10, 2017 · 8 comments · Fixed by #36
Closed

Cloning Specific Version from Crates.io #17

iwillspeak opened this issue Jul 10, 2017 · 8 comments · Fixed by #36
Assignees

Comments

@iwillspeak
Copy link

iwillspeak commented Jul 10, 2017

I'm trying to clone a specific version of a crate from Crates.io using this command. The crate version is 64.0.0. If i run cargo clone --vers 64.0.0 onig_sys I get version 64.0.1 rather than 64.0.0. I can clone 63.0.0 successfully. It looks like the --vers string is being treated as ^64.0.0 not =64.0.0.

I tried using =64.0.0 and <=64.0.0 but got the error error: cannot parse '=64.0.0' as a semver.

@iwillspeak
Copy link
Author

Any update on this?

@pravic
Copy link
Contributor

pravic commented Jan 9, 2018

It is even worse:

cargo clone tokei --vers 6.1.3 clones 6.1.3
cargo clone tokei --vers 6.1.2 clones 6.1.3 as well
cargo clone tokei --vers =6.1.3 throws an error with cannot parse '=6.1.3' as a semver.

@pravic
Copy link
Contributor

pravic commented Jan 9, 2018

@JanLikar is it possible to clone a specific version? May be I am missing something?

@JanLikar
Copy link
Owner

JanLikar commented Jan 9, 2018

The version argument gets passed to cargo and is not altered by cargo-clone in any way. I guess this is the default behaviour... The only thing I can say at this time is, I will have to check what builtin commands do with the version specification and mimic that, because mirroring Cargo builtins is one of the goals of this crate.

@smvoss
Copy link

smvoss commented Feb 6, 2018

rust-lang/cargo#4229 may include the answer to this issue.

It looks as if wrapping the passed down arguments explicitly in quotation marks will make sure it gets parsed correctly, and the ranges will be respected.

Edit: I was finally able to test this and also does not work. Interesting, will keep digging.

@jethrogb
Copy link

jethrogb commented Jan 9, 2019

Just use whatever the equivalent of --precise is

@repi
Copy link

repi commented Dec 25, 2021

this is still broken

@JanLikar JanLikar self-assigned this Dec 25, 2021
@JanLikar
Copy link
Owner

I'll see what I can do, I have some time for this now.

JanLikar added a commit that referenced this issue Dec 25, 2021
JanLikar added a commit that referenced this issue Dec 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants