-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
byteorder = ">=1.3.0, < 1.4.0"
restriction might be controversial
#380
Comments
Not respecting the < 1.4.0 seems to be a bug on cargo's part. This restriction doesn't actually prevent downstream users from using byteorder 1.4 elsewhere in their crate, it will just result in two different versions of byteorder being included in the final build. The policy of this crate is that it must build on rust 1.18.0 for the 1.0 version. Bumping the MSRV without changing major versions can cause someone's build to break so changing MSRV is a breaking change. |
also I would like to point out your cargo.lock uses bincode 1.3.1, which doesn't have the 1.4 restriction. This is cargo trying to solve for minimal deps. |
Indeed! Totally missed that.
Well it does: [dependencies]
bincode = "=1.3.2"
byteorder = "=1.4.0"
Hm, it also seems that making such a restriction is a breaking change, because if I already use |
looking into this further it seems like a missing component of cargo rust-lang/cargo#6584 (comment). Rust can technically handle this but cargo doesn't allow it to. Either Cargo or byteorder needs to fix this since Cargo is missing an important feature and byteorder isn't following semver properly. |
@ZoeyR could you please elaborate a bit on how |
@mexus either byteorder needs to revert its MSRV changes or yank 1.4 and release breaking changes in 2.0 |
That's false. semver only applies to incompatible API changes. The API of byteorder 1.3 is compatible with the API of byteorder 1.4. It's your project, so it's your rules. If you want to treat MSRV bumps as breaking changes, then that's your prerogative. But don't misrepresent me by claiming I'm doing something that I'm not. |
Let's get a minimal library that got
bincode
andbyteorder
as the only dependencies:Then
cargo check
it and see the contents of the generatedCargo.lock
:As you can see, the bincode's
byteorder < 1.4.0
requirement is completely ignored.If we assume it's simply a bug in
cargo
(I'm not quite sure about this to be honest) and it will get fixed sooner or later, then this restriction will prevent users from utilizing byteorder's features introduced in 1.4.0 (because there will be conflicting minor versions in the tree). Please correct me if I'm wrong, but isn't the only purpose of pinning the byteorder's minor version to make MSRV to be1.18.0
? But won't it be simpler for the end user to pin the crates not supporting rust-1.18 with their own hands? I mean, most probably they'll need to do that anyhow with other crates.Also the restriction makes
cargo outdated
go crazy :))Could there be a chance to.. well.. eliminate the
, < 1.4.0
part?Thanks!
The text was updated successfully, but these errors were encountered: