-
Notifications
You must be signed in to change notification settings - Fork 43
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
Pinning deps in Cargo.toml
#99
Comments
That is correct, apparently. I had assumed that you could just have a few distinct versions of a crate, but apparently e.g. having That said, I think I will wait for someone to complain with a specific use-case before dropping the maximum requirements. It's just two crates, which were already quite stable at their respective maximum versions, and the current pinned versions allow this crate to be very straightforwardly msrv-compliant. I will add a note about bumping the MSRV to make this a non-issue in 3.0.0 however. At least until some dependency starts requiring Rust 1.90 or something, I guess 😁 |
Not sure if exactly part of this issue, but with the bitcoindevkit/bdk project I just found that
|
Not really related to this issue, but loosening the requirement from 0.21.6 to 0.21.1 didn't seem to cause any problems, so I released that as 2.9.1. |
Hello. I've ran into a version conflict when developing a simple Tauri app: $ npm run tauri dev
> tauri
> tauri dev
Updating crates.io index
Info Watching /mnt/share/prj/myapp/myapp-electron-poc/tauri/src-tauri for changes...
error: failed to select a version for `log`.
... required by package `minreq v2.10.0`
... which satisfies dependency `minreq = "^2.10.0"` of package `jams_electron_poc v0.0.1 (/mnt/share/prj/myapp/myapp-electron-poc/rust)`
... which satisfies path dependency `jams_electron_poc` of package `app v0.1.0 (/mnt/share/prj/myapp/myapp-electron-poc/tauri/src-tauri)`
versions that meet the requirements `>=0.4.0, <0.4.19` are: 0.4.18, 0.4.17, 0.4.16, 0.4.15, 0.4.14, 0.4.13, 0.4.11, 0.4.8, 0.4.7, 0.4.6, 0.4.5, 0.4.4, 0.4.3, 0.4.2, 0.4.1, 0.4.0
all possible versions conflict with previously selected packages.
previously selected package `log v0.4.20`
... which satisfies dependency `log = "=0.4.20"` of package `app v0.1.0 (/mnt/share/prj/myapp/myapp-electron-poc/tauri/src-tauri)`
failed to select a version for `log` which could resolve this conflict |
Fair enough, I'll remove the pins. I'll do it in a minor version though, as someone might be depending on 2.9 working with the MSRV out-of-the-box. |
Fixed in 2.11.0! |
IIUC pinning deps in
Cargo.toml
2fc7f0e could cause issues in downstream libs, what I see in other projects is leaving the version specified in the Cargo toml to potentially violate the MSRV via semver version selection but usingcargo update -p
in CI (and a mention in the README about the pinning in the MSRV section)https://github.com/rust-bitcoin/rust-bitcoin/blob/cdbd4be4b1391cd4b1537ab05a0cfb0d13e37c59/contrib/test.sh#L11-L15
The text was updated successfully, but these errors were encountered: