-
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
Cargo 1.33.0-nightly (0d1f1bbea 2018-12-19) only pulling the latest version #6509
Comments
This is normal. If a version does not have any operators, it is assumed to be a caret requirement. If you want to force a specific version, prefix it with |
Well, that's a new one. Confirmed that this makes things work out: [dependencies]
cortex-m-rt = "=0.6.5"
serde = "=1.0.80" When did this functionality change? |
I believe it has always been that way. Perhaps the |
The issue here is that upstream, cortext-m-rt is no longer compatible with what is shipping in the Rust Embedded book. I also don't fundamentally agree with how this works. I'd expect if I left off a minor version that it would be free to upgrade. For example, if my Cargo.toml looked like this:
It would be fair game to go to the newer version. Now, the docs clearly show that updating would allow it, so this functionality is intentional. I guess I need to dig into both why "no operator means caret" was decided upon and why a specific version with "^1.2.3" would be allowed to play with version numbers and see if I can understand the rationale, because both seem like a bad ideas for backward compatibility. |
Okay, good news! I just never read the Semver spec and it seems the package I was using didn't follow it as they introduced a breaking change in a patch version instead of bumping the major number. |
Problem
Cargo seems to be ignoring the version asked for in Cargo.toml and is pulling the latest
Steps
Create a basic binary project, then add a dependency:
Run
cargo build
:Possible Solution(s)
Notes
I can force it by changing Cargo.lock manually, delete the [metadata] section, but doing a
cargo update
brings it back:Infos:
The text was updated successfully, but these errors were encountered: