Comments (5)
Having 0.0.z
not compatible with 0.0.(z+1)
is consistent with npm.
from semver.
In that case we should discourage publishing these or ban it fully. 0.0.x
is useless because you simply can't give users a fix if a bug was discovered.
from semver.
0.0.x
is useless because you simply can't give users a fix if a bug was discovered.
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 0.(>=1).*
.
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 )
from semver.
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.
The problem isn't in normal usage, but when a 0.0.x
crate has a bug that can be fixed with a backwards-compat release, except there's nothing like 0.0.x.1
to actually release it as.
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.
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.
You can use 0.x
in exactly the same way. 0.0.x
is redundant with that, but is strictly worse because you can't release a patch when other crates (inevitably) depend on yours.
from semver.
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.
from semver.
Related Issues (20)
- How to sort a list by the latest version HOT 1
- nonzero_leading_trailing_zeros requires rustc 1.53.0 HOT 1
- Error using unstable feature: nonzero_leading_trailing_zeros in nightly rust HOT 2
- Error about an unstable lint HOT 1
- Wildcard VersionReq alongside other requirements HOT 3
- `is_exact`? HOT 2
- Display impl for Version no longer supports padding
- 1.0.4 broke older nightlies HOT 1
- Why is Op non-exhaustive? HOT 1
- Doc/test requests from an audit from a vendor crate bump HOT 1
- Unable to parse v0.0.1-001 HOT 1
- Negation operator HOT 1
- v1.0.8 breaks Send/Sync impls on some public structs HOT 1
- Please yank version 1.0.8 when you get the chance HOT 1
- Implementation for range with multiple look buged when pre-release are not present HOT 1
- `cargo doc` emits errors, but then works anyway
- Error when cargo fuzz HOT 1
- Pre-release requirement not satisfied HOT 2
- `Identifier::new_unchecked()` writes to null pointer on allocation failure HOT 2
- Implement Ord for VersionReq? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semver.