Giter Club home page Giter Club logo

Comments (5)

lambda-fairy avatar lambda-fairy commented on July 20, 2024

Having 0.0.z not compatible with 0.0.(z+1) is consistent with npm.

from semver.

eddyb avatar eddyb commented on July 20, 2024

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.

kentfredric avatar kentfredric commented on July 20, 2024

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.

eddyb avatar eddyb commented on July 20, 2024

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.

dtolnay avatar dtolnay commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.