-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
0.0.z not compatible with 0.0.z+1 #106
Comments
Having |
In that case we should discourage publishing these or ban it fully. |
My impression that there's a good intention behind this, as 0.x is "unstable", and 0.0.x is "ultra unstable". Subsequently, I think the use for 0.0.x is for people who are still rapidly changing their project early in the development cycle, where there should be no expectation of inter-compatibility. Just the communication around this isn't loud enough, so people may either mis-use this version range for their published crates when they aught to migrate to And further, people depend on 0.0.x crates expecting some degree of stability that isn't there, and people depending on 0.0.x should not expect to receive updates, as any updates are likely to also come with API breaking changes. Sure, as-is, it is surprising behaviour, but the surprise comes from a missmatch between what you've learned and what is true. I'd probably argue in favour of better warnings or documentation regarding the use of 0.0.x ( both in publishing the package, and in the consumption of the package ), than argue 0.0.x to be banned outright. ( It would be especially useful if you're developing a small gaggle of interdependent crates, and rapidly changing their APIs, being able to develop and test them efficiently via cargo, without being forced to promise users a support level you're not ready for ) |
The problem isn't in normal usage, but when a This could even be a Rust soundness bug which can only be fixed with a breaking change in the compiler, so being able to release fixed versions of crates can be useful.
You can use |
I believe the current behavior matches the description of caret requirements in https://github.com/semver/semver/blob/efcff2c838c9945f79bfd21c1df0073271bcc29c/ranges.md, and matches Cargo's intended behavior, so I'll go ahead and close this. |
@eddyb brought this up in
#rust-internals
today. Ify != 0
, anyz
is compatible, but ify == 0
, they're not. This feels wrong.I haven't reproduced yet, though.
The text was updated successfully, but these errors were encountered: