-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
doc: semver behaviour of cargo confusing in guessing game #26482
Comments
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Jul 8, 2015
We weren't explicit enough about Cargo's default version behavior. For rust-lang/rust at least, Fixes rust-lang#26482
steveklabnik
added a commit
to steveklabnik/cargo
that referenced
this issue
Jul 8, 2015
In addition, clean up these docs a little. Addresses part of rust-lang/rust#26482
bors
added a commit
to rust-lang/cargo
that referenced
this issue
Jul 8, 2015
In addition, clean up these docs a little. Addresses part of rust-lang/rust#26482
steveklabnik
added a commit
to steveklabnik/rust
that referenced
this issue
Jul 8, 2015
We weren't explicit enough about Cargo's default version behavior. For rust-lang/rust at least, Fixes rust-lang#26482
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just started reading about the guessing game in the rust book and thought I should share my experiences.
When being introduced to dependencies in cargo the version specification given is:
Followed by this text:
This was very confusing for me coming from using semver with npm, I expected
0.3.0
to match exactly and it took me a while to understand why that was not the case.Apparently npm's default behaviour is to match an exact version while cargo's is to use a careted version.
It is documented on http://doc.crates.io/crates-io.html that cargo defaults to use careted versions:
Which differs from npm, from https://docs.npmjs.com/misc/semver :
I would like to offer two suggestions:
Explain in the guessing game how we told Cargo we wanted a
0.3.x
version, currently this is just a statement (So, we told Cargo we wanted ...
) without explanation.Make it more clear how cargo and npm differ with regards to semver, especially considering npm is linked to directly in the documentation.
The text was updated successfully, but these errors were encountered: