17 ms·
What's next for SemVer
- alexandernst 8y agoWhat are SemVers current flaws? Maybe I missed a link in the article.
- steveklabnik 8y agoHere's the largest, IMHO: none of the matchers are in the spec. It purely talks about versions themselves, not how you specify ranges. It's only really got half of the important stuff in it!
- jonahx 8y agoCould you elaborate on this?
- steveklabnik 8y ago“Matchers” or “ranges” (even the terminology is split up thanks to the lack of a spec!) are not defined in semver. It only defines how to version a particular software artifact, it cannot answer the question “does version 1.2.3 fit the constraint > 1.0.0?” Does that make sense? The “> 1.0.0” part is undefined. That includes things like “is that space required there?”, and so is an interoperabilty issue.
- jolmg 8y agoI don't see what's ambiguous in that. > does version 1.2.3 fit the constraint > 1.0.0? I would answer, yes, 1.2.3 is greater than 1.0.0. I can't see how anyone would interpret it differently.
- untog 8y agoBut someone might well interpret it differently. The whole point is to define this stuff. There's no harm in writing down assumptions, even if they're ones everyone is making.
- steveklabnik 8y agoI should have used "x.y.z" instead of a hard number, as it kind of obscures the point. The concept of "this is a thing I use to specify a range of versions", as a concept, does not exist in the spec. This means "> 1.0.0", in the context of the SemVer spec, is meaningless. This means you cannot answer the question, even though, as a human, you can intuit what's meant. Computers cannot. (Additionally, there are other questions as I mentioned above. Is ">1.0.0" allowed too, or not? Getting parsers correct is important.)
- spenczar5 8y agoHow about "does version 1.2.3-alpha.3 fit the constraint "~1.2.3"? If you're asking "what the heck does a tilde mean?" then, yep, that's one of the current problems - it has a de facto meaning because the npm semver package started using it, and now it is adopted by some (but not all) semver implementations in the wild.
- munificent 8y agoThat's an easy one. Try: Does "<=2.3.4" include "2.3.3-some.prerelease"? Justify your answer. :)
- merlincorey 8y agoAt least with Gitflow and Githubflow workflows, it is my understanding that we change the version number in the release/feature branch. With that understanding in mind (regardless of it matching your understanding, I mean), then clearly, "2.3.3-some.prerelease" is in fact less than "2.3.4", or it would have been named "2.3.4-some.prerelease". Therefore, I believe it is clear that workflow must necessarily be considered to understand SemVer.
- munificent 8y agoSo if a user has the version constraint ">=2.3.3 <2.3.4", should they get that pre-release version?
- merlincorey 8y agoThis is covered explicitly in the SemVer specification section 11[0]. The answer depends on if there exists a released "2.3.3" version, in which case, the pre-release is not selected, because pre-release versions have less priority than release versions. The spec provides the following example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0. [0] https://semver.org/#spec-item-11 https://semver.org/#spec-item-11
- FiddlyPack 8y agoHe didn’t say it was necessarily ambiguous, only that the syntax is not part of the spec, and thus someone could define “> 1.0.0” as meaning “redirect to the version 1.0.0” and it would still be SemVer currently. Although I don’t know exactly what that would mean, this choice is foolish given the current implementations of SemVer, perhaps it makes sense from a bash-user perspective.
- appleflaxen 8y agoand yet my matcher disagrees, and there is no way to determine which behavior is correct. the "no way to determine" is the point here, not the details of the example that was chosen.
- rabidrat 8y agoYes, but how did you come to that conclusion? Lexical matching, piecewise numeric matching? What's the programmatic way of determining that? For a better example, how about version 1.9 vs 1.10? Or 1.9rc1 vs 1.9?
- merlincorey 8y agoYour example does not follow SemVer. If it did, however, your query would have a straightforward answer described in Section 11 of the Specification[0] Here is their example for how to handle pre-release versions: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0. The example shows that "1.9-rc.1" is less than "1.9" and both are less than "1.10". So while it is true that many parts of SemVer are as yet unspecified, it seems to me (from these comments), that many people do not understand the already specified parts of SemVer, currently. [0] https://semver.org/#spec-item-11 https://semver.org/#spec-item-11
- aae42 8y agocan you explain that for us?
- kenhwang 8y agoI would love an unified matchers syntax. After dealing with ivy matchers, I very much prefer the npm/bundler/cargo style matchers, but would love them to all be exactly the same.
- steveklabnik 8y agoMe too! It's my personal highest priority, so here's hoping!
- chrisseaton 8y agoI think the key flaw is that some people just don't like incrementing the major version number! It's a simple as that.
- bobwaycott 8y agoAre you bemoaning the lack of backward incompatible changes, or the lack of major version numbers because it feels like progress?
- chrisseaton 8y agoI'm not bemoaning anything, mate. I'm saying other people bemoan it. If you want to know why you'll have to ask them.
- bobwaycott 8y agoNo problem. It remains unclear how other people not wanting to increment a major version is SemVer’s key flaw. Perhaps you could have worded that better?
- chrisseaton 8y agoIf people don't want to use SemVer because they don't like incrementing the major component then that's a fundamental flaw. There's no point in it if it's not being used. There's already a few examples of people's attitudes in sibling comments. > Perhaps you could have worded that better? That's a bit snide.
- bobwaycott 8y ago> That's a bit snide. I've tried twice now to better understand what you're trying to say. In neither case have I been derogatory, mocking, or negative in intent or wording. Yet both times, you seem to have taken offense. You do you, mate, but it is immensely unhelpful to clarifying your point to someone who wanted to understand it.
- ccheney 8y agoHere's a flaw I'd love to see fixed (2013) https://github.com/semver/semver/issues/145 https://github.com/semver/semver/issues/145 Issues with delimiters in release versions on Linux
- spenczar5 8y agoI'm excited to see this. I would hope to see someone from the Go community get involved in the maintainer group, though. Russ Cox's philosophy on versioning is now baked into the Go language pretty deeply, and it's (at least partly) motivated by problems with semver, real or perceived: > Where I think semver falls short is the idea that “having to bump major versions” is a step that will make you “think through the impact of your changes and evaluate the cost/benefit ratio involved.” Quite the opposite: it’s far too easy to read semver as implying that as long as you increment the major version when you make an incompatible change, everything else will work out. The example shows that this is not the case. (from https://research.swtch.com/vgo-import https://research.swtch.com/vgo-import, one of the treatises on go versioning) Despite this criticism, Go is sort of still using semver, at least as a way to compare string version identifiers. I think it's fair to say that Go users form a significant community using semantic versioning. It would be a mistake to leave them out of RFC discussions on the topic.
- steveklabnik 8y agoI didn't previously reach out to anyone from Go specifically because they do not really use SemVer. As a group, we're open to including others than this initial roster, but didn't think it would be particularly relevant to their interest. If that's incorrect, someone please get in touch!
- spenczar5 8y agoThe language implements semver directly in the Go language source: https://github.com/golang/go/blob/47d5a4433513c3870a9994b50ed4fa2af628c742/src/cmd/go/internal/semver/semver.go https://github.com/golang/go/blob/47d5a4433513c3870a9994b50e... This is used to resolve module loading, according to this logic: https://github.com/golang/go/blob/aab0b704d88b7dad10c767ad941619d59887203c/src/cmd/go/internal/modload/query.go#L17-L35 https://github.com/golang/go/blob/aab0b704d88b7dad10c767ad94...
- steveklabnik 8y agoThanks for the citations! Reading this, it's semver-ish for sure; that said, the "ish" is exactly why we're doing this. I'll try to figure out how to get in touch with someone.
- garmaine 8y agoWhat's the punchline? This post doesn't detail at all what's next for SemVer. What changes are coming? What's wrong with SemVer that needs fixing?
- steveklabnik 8y agoThis is an announcement that we have created a mechanism for making changes. It's now up to us (and anyone else submitting RFCs) to decide what changes are coming. I can't tell the future, only lay down those principles. As I said in my other comment, a lack of spec for ranges is a key addition that'll be coming.
- paulddraper 8y agoThey clearly have some deficiencies in mind; an example or two would go a long way toward helping this post.
- steveklabnik 8y agoI think that getting all of the implementations on the same page is possibly even more valuable than any changes. For example, since ranges aren't in the spec, npm and Cargo treat "1.2.3" very differently. Since we can't break either ecosystem, that means that that specific aspect will have to be either implementation-defined or "choose one of these two ways," but we can at least discover where these kinds of cases are, and possibly fix them, or properly spec them, as needed. This matters a lot for interoperability. For example, Notion is a Rust project that manages JavaScript stuff; for this to work, Rust's implementation will need a "do it like npm" flag. This is really tough when it's not even spelled out anywhere what the possibilities are. The lack of this causes more issues than real actual problems with the text as it is today, IMHO. For example, the Go code above requires a "v", which is not in the current spec, but some implementations handle it, some don't. Driving these things out is important!
- sonofgod 8y agoThe link to https://github.com/orgs/semver/teams/maintainers/members https://github.com/orgs/semver/teams/maintainers/members 404s for me -- I'm guessing due to permissions?
- steveklabnik 8y agoI left a comment below about the problems; the link apparently 404s because of GitHub, see the footnote I added next to the link. Sorry about that! Not under my control :/
- transfire 8y agoIn my usage of SemiVer I felt it lacked what I call a "gestalt number" which would be the first number, representing broad changes to the design which (almost always) necessarily include API changes. But API changes can happen within the same "gestalt".
- matthewaveryusa 8y agoopenssl kind of works like that -- but I believe they are moving to semver
- zozbot123 8y agoWhy does a SemVer spec have to deal with that? Why not have a "gestalt" number/indicator for purely informal use, but keep the SemVer part as is?
- StavrosK 8y agoAnd call the project Foo 3 v4.1.9? That seems pretty confusing.
- dtech 8y agoThat's essentially a 4-part version number. For most projects it's over the top and almost no-one used or uses 1.2.3.4 version numbers. I've seen libraries use "library3 1.6.2" [1] but it feels very strange and confusing. [1] https://github.com/etorreborre/specs2/releases https://github.com/etorreborre/specs2/releases
- rspeer 8y agoI've certainly encountered this issue. When I release ConceptNet, I would like to follow SemVer, but it kind of has to be in a way that the second component of the version is the major version, because there are bigger things that happen in a multi-decade project than just API changes. The project is ConceptNet 5. It is the fifth project named ConceptNet. What it has in common with ConceptNet 4 is some of the data and the spirit of the problem to be solved; the design is quite different. It's on the sixth major version after the initial release, so I call it ConceptNet 5.6. The current version is 5.6.4. If I wanted to use tools that expect SemVer, I'd have to call it something like "ConceptNet 5 v6.4". I find that confusing, and I think other people would too.
- ccleve 8y agoI want to see some support for alpha, beta, pre-release, and snapshot versions. The problem is that everyone does it differently, and build systems have a hard time distinguishing these non-production-ready versions. For example, I type "mvn versions:display-dependency-updates" and I get a suggestion that I use "junit 4.13-beta-2".
- steveklabnik 8y agoThe SemVer spec does have pre-release versions https://semver.org/#spec-item-9 https://semver.org/#spec-item-9 But, I guess you're saying that certain kinds of names in the pre-release space should have defined semantics?
- ivan_gammel 8y ago“-SNAPSHOT” suffix already has defined semantics in Maven world, which would make sense to replicate elsewhere, since it’s very convenient for CI. Alfa, Beta etc. could be used to improve multi-environment CD (eg UAT envs could accept RCs, production - only stable versions and so on).
- ccleve 8y agoAh yes, didn't know that was there. Would be nice if Maven acknowledged it. Some kind of standardization would be helpful. In particular, it would be good if a tool could sort on the post-hyphen part so it could know which pre-release version is most recent.
- x15 8y agoYou might like this format: https://xenforo.com/xf2-docs/dev/add-on-structure/#recommended-version-string-format https://xenforo.com/xf2-docs/dev/add-on-structure/#recommend...
- mitchtbaum 8y agoI would like to work similarly to how WHATWG makes HTML a "living standard", with rolling releases tracked by http://caniuse.com/ http://caniuse.com/ instead of working so hard to name changes with oversimplified numbers, our change management systems could do all this for us with metadata see also [the package manager we need](https://gist.github.com/dominictarr/7c3319a0b0bad22bde2c https://gist.github.com/dominictarr/7c3319a0b0bad22bde2c), [Towards "annex", a Fact Based Dependency System](https://speakerdeck.com/markhibberd/towards-annex-a-fact-based-dependency-system https://speakerdeck.com/markhibberd/towards-annex-a-fact-bas...), ["Towards "annex", a Fact Based Dependency System" by Mark Hibberd](https://www.youtube.com/watch?v=JjYAnBhF2JU https://www.youtube.com/watch?v=JjYAnBhF2JU)
- spenczar5 8y agoFrankly, I think browser compatibility is one of the nastiest, trickiest bits of web development. I'd want to find any way to avoid that sort of thing. The "living standard" model merely describes underlying complexity without resolving any of it, which puts the burden on individual developers. I think we can do better.
- mitchtbaum 8y ago> The "living standard" model merely describes underlying complexity without resolving any of it, which puts the burden on individual developers. Don't blame people when it's their tools that are at fault. "If you want to teach people a new way of thinking, don’t bother trying to teach them. Instead, give them a tool, the use of which will lead to new ways of thinking." - Buckminster Fuller
- spenczar5 8y agoI'm confused. Can you explain which tool is at fault, and for which problem, here?
- mitchtbaum 8y agocoding needs to be more automatic api changes aren't such a big deal they only seem like it now, because the editor is the primary coding tool code should be generated from content. roughly speaking: - https://en.wikipedia.org/wiki/Code_as_data_(disambiguation) https://en.wikipedia.org/wiki/Code_as_data_(disambiguation) - https://en.wikipedia.org/wiki/Code_generation_(compiler) https://en.wikipedia.org/wiki/Code_generation_(compiler) - https://en.wikipedia.org/wiki/Round-trip_engineering https://en.wikipedia.org/wiki/Round-trip_engineering - https://en.wikipedia.org/wiki/Model-driven_engineering https://en.wikipedia.org/wiki/Model-driven_engineering further, I believe: > code is unrefactored config > config is immature content > content is unrefined code
- nathanaldensr 8y agoInteresting to see this topic coming up. I just recently complained to Microsoft about how Azure Artifacts' "Universal Packages"[1] only supports strict Semantic Versioning with no extras (no additional version number components past patch and no commit hash). This is problematic because there are still several versioning schemes that use four version components, most notably Windows binaries. I was really interested in using Universal Packages to store application binaries as part of a set of new CI pipelines I'm architecting; unfortunately, I have to resort to NuGet, which still supports <major>.<minor>.<patch>.<buildid>+commithash syntax. I realized the issue was with Semantic Versioning itself. The spec should be changed to mention that any number of additional dotted version components are allowed after <major>.<minor>.<patch> but that they have no semantic meaning. This would help address legacy versioning concerns like mine while not being too prescriptive. Only having three version components is additionally problematic because there is no place for CI build IDs in the version. Imagine I'm working in a bug-fix branch called 1.5.4. I might have several commits that all trigger CI pipelines. I don't want to increment the patch component until I actually merge the bug fix into master, but I still want my CI system to generate unique version numbers per build. There currently doesn't seem to be a way to do that without being forced to use pre-release identifiers (e.g., 1.5.4-beta.1, -beta.2, etc.), which unnecessarily complicates the CI pipeline. [1]: https://docs.microsoft.com/en-us/azure/devops/artifacts/quickstarts/universal-packages?view=azure-devops&tabs=azuredevops https://docs.microsoft.com/en-us/azure/devops/artifacts/quic...
- thesunny 8y agoTimely for me as well. Another reason for adding an additional version number component is this: I use an open source library that I need to fork. Since the library uses the `patch` number component, it's hard to release forked versions to NPM without having conflicting patch numbers. For example, if the library is at `0.15.4` I don't want to release my updates as `0.15.5`, `0.15.6` etc. because when the main library updates to `0.15.5` we have conflict/confusion. Instead, I'd like to `0.15.4.1` to indicate my `.1` update to `0.15.4`. When they update to `0.15.5` I can merge and release a version at `0.15.5.1`
- nathanaldensr 8y ago
- munificent 8y agoThis is great! Natalie Weizenbaum and I used SemVer when we created pub, the package manager for Dart. It was a good choice, but we definitely ran into some subtle problems over the years. Briefly: * Like Steve notes, Semver doesn't specify any syntax and semantics ranges, constraints, or other "groups of versions". Every package manager just rolls its own thing, hopefully in a mostly compatible way. * SemVer used to specify an ordering for build versions ("1.2.3+1" versus "1.2.3+2") and then later removed that. Pub still uses the older semantics because a package manager has to do something. If the user requests "foo 1.2.3" and both "1.2.3+1" and "1.2.3+2" exist, what's the package manager supposed to do? Pick randomly? So we still technically use the older SemVer spec where this ordering is defined. * It's hard for a package to transition into a period of experimental development. Let's say you maintain foo which has lots of users. Foo 1.2.3 is out and lots of people are using it. You want to start working on a major, breaking revision to foo. You need to do that in a way that doesn't spontaneously break existing users, but you also want to ship something so that you can get feedback from early adopters. Right now, the way you do this is by shipping a series of pre-release versions like 2.0.0-dev.1, etc. That works, but users are often confused that a range like ">=2.0.0" does not include those dev versions, nor does "<2.0.0". It doesn't feel to me that SemVer gracefully handles the idea that previously stable packages may go through periods of instability. Pre-releases are sort of the imaginary numbers of SemVer where they don't really fit the natural linearization of version numbers. Many projects now have "channels" of development where users can indicate whether they want to be on "stable", "dev", "bleeding edge", etc. When it comes to pre-releases and experimental versions, I think users generally want to indicate whether they want to be on the bleeding edge or not. Today, at least in pub, they have to indicate that using some carefully crafted version constraint that only includes pre-releases. It would be nice if that was a more direct way to express that. (The fact that SemVer doesn't define ranges compounds this. I think our interpretation of ranges mostly follows npm.)
- steveklabnik 8y agoThanks! These are all great points. And, if someone from Dart wants to get involved, please open an issue on the repository. We needed to start somewhere, but also don't want to exclude other package managers, either.
- brudgers 8y agoWhat's not new: Semantic Versioning is an excuse to break existing code...or more cynically, SemVer is a promise to break your code. The author cites Ruby and Javascript as examples of semantic versioning's success. But trying really hard to not break existing code is a core principle of both languages development. MINASWAN [0] and principal of least surprise in Ruby . A consensus formal specification process for ECMAScript [1] (aka "JavaScript"). [0] https://en.wiktionary.org/wiki/MINASWAN https://en.wiktionary.org/wiki/MINASWAN [1] A breaking change looks like this, https://itnext.io/a-tiny-disastrous-ecmascript-change-fadc05c83e69 https://itnext.io/a-tiny-disastrous-ecmascript-change-fadc05...
- joemi 8y agoIt's neither an excuse nor a promise to break code. It's merely a version numbering scheme that makes it explicit which versions will break code. If you're using semver and you don't want your next version to break code, go ahead and release it with an increased minor version. Major version increases aren't for you then.
- brudgers 8y agoSemantic versioning reduces the social cost of breaking changes. It makes them more likely.
- pryce 8y agoSuppose we replaced Semantic Versioning with any other approach (of your choice) that still disclosed the same amount of information about whether API was identical, had an additive change, or had a breaking change. Would you object to that model too ? If so, it seems like you'd be effectively arguing that authors should simply not disclose important changes to the API. It is hard to imagine that position being defensible. If not, why do you consider Semantic Versioning to be more hazardous?
- badsectoracula 8y agoI think the idea (with which i fully agree, btw) is to avoid at all technically possible costs to make backwards incompatible changes in the first place (and when they happen they should be considered as nothing more than bugs to be fixed - ie. restore the backwards compatibility) and the semantics of semver are trying to represent some state that shouldn't be representable at all. Think of it as a reference in C++ that is null... it can technically happen (in the sense that all bytes that store the reference are, e.g., zero), but the language doesn't really allow for it and if it does happen it is a bug.
- k__ 8y agoComVer is what's next. https://github.com/staltz/comver https://github.com/staltz/comver
- quickthrower2 8y agoI quite like that scheme. It saves all the debate about whether to increment the 2nd or 3rd number. The downside to such a scheme in terms of production releases (rather than libraries), is I have where 2.3 might need a fix for production, while 2.4 is being worked on. So the natural release number is 2.3.1. With ComVer you are forced to make your production fix 2.4 and rename the WIP version 2.5 which can be a pain depending on your JIRA/CI setup etc.
- ruuda 8y agoFor an interesting take on versioning, see the Spec-ulation keynote by Rich Hickey [1]. It specifically touches upon SemVer being itself versioned. [1]: https://www.youtube.com/watch?v=oyLBGkS5ICk https://www.youtube.com/watch?v=oyLBGkS5ICk
- badsectoracula 8y agoThis is an excellent talk, i found myself fully agreeing and kind of relieved that i'm not the only one thinking that you shouldn't break backwards compatibility and if you do, then rename the API. I'd only add that for libraries renaming "FOO 1" (with "1" often implied) to "FOO 2" isn't a good new name since someone else might want to pick up the slack and continue developing a "FOO 2" that is backwards compatible. One of my favorite parts of the talk is the X.Y.Z changes in semver essentially translating (from a user perspective) to imscrewed.dontcare.dontcare :-P. Sadly it seems that this talk has been largely ignored. I'd like everyone who provides any library, framework or anything else that other people are supposed to build on - especially on the perpetually broken Linux desktop - to watch this talk.
- slowmovintarget 8y agoSemVer bit starts at https://youtu.be/oyLBGkS5ICk?t=825 https://youtu.be/oyLBGkS5ICk?t=825 Have to agree, excellent talk.
- joppy 8y agoIt's a great talk. I can't remember whether he says it directly in the talk, but the upshot of his argument is that the "major version" part of SemVer is pretty much useless information to library consumers, and suggests that rather than using major versions, libraries should just change their names.
- jt2190 8y agoThe map is not the territory. Similarly, the semantic version number is not the API. Why are we relying on fallible humans to examine an API and encode an assertion about its backwards compatibility into a number? Further, why are we then handing this (often dubious) assertion of backwards compatibility to machines to depend on? Can't we create a set of rules/tests that will actually execute the API to determine whether it's backwards compatible? Why aren't we doing that more?
- steveklabnik 8y agoThere are tools to do this! Elm has the best-known implementation. However, the real reason is exactly why "compatibility" is not defined in the spec. It is really hard to pin this down, and possibly impossible. Machines can help humans check these kinds of things, but they still need humans in the end.
- hluska 8y agoFiguring out how to make a computer decide that one API is compatible with another would be bloody hard. I hesitate to say 'impossible' because today, I can subscribe to much of what I deemed impossible two decades ago. If you can figure this out, it would be an absolutely amazing feat. Best of luck!
- simplecomplex 8y agoFully typed functional languages (Haskell for example) have this ability.
- dagenix 8y agoI'm not sure that is correct. A function that takes no arguments and returns 2 and a function that takes no arguments and returns 3 both have the same type signature. I'm not super strong on the theoretical side of computer science, but, my understanding is that the only general solution to determining if our function returns 2 or 3 (or some other integer) is equivalent to the halting problem.
- maltalex 8y agoWhat I don't like about SemVer is that all breaking changes look exactly the same. That's why I like to use SemVer with a small twist - a fourth number prepended to the regular three: A.B.C.D. `B`, `C`, and `D` are the regular SemVer Major, Minor, and Patch. But `A` is "Generation" - something you increment only for fundamental changes to the codebase .i.e. 2.0.0.0 is a different generation of the product than 1.7.45.4, while 1.8.0.0 is the same generation, only with some incompatible APIs.
- Amelorate 8y agoRust sort of already has this, though implemented in a worse way. They use 0.[major/minor].[minor/patch]. When the library author wants to indicate that their library is stable, they go to 1.0.0 and promise that they'll never make a breaking change. The problem with that approach is that you never know if a change is major or minor, since many projects use the 0.A.B differently. Even if projects were standardized, you're missing some information compated to A.B.C or A.B.C.D.
- steveklabnik 8y agoThis is an additional thing I'd really like to gain clarity on in the spec itself. Given that ranges have no definition currently.... Oh, also > they go to 1.0.0 and promise that they'll never make a breaking change. That's not what 1.0 means; 2.0 can be produced with breaking changes.
- lmkg 8y agoI think GP means that as a cultural thing, the Rust/Cargo ecosystem has a strong aversion to breaking changes, and as a result tends not to do anything that would require a bump to 2.0.
- FichteFoll 8y agoTo me this is something that a changelog should clarify. SemVer is intended to be used by machines and a change in a major version should prompt a developer to take a look at the actual changes (i.e. the changelog) and whether they are affected by those. Adding another number for this purpose still does not tell you whether your particular use case of a library received breaking changes or not.
- jancsika 8y agoHere's a hypothetical feature of all package managers: * for all stable packages requested by the user, always upgrade to the most recent stable version that has the same major number as the one currently installed Can npm, apt, cargo, guix, etc. safely do this presently for the set of packages that use semver? If the answer is no, then what is the value to using semver?
- spenczar5 8y agoWhat does "safely do this" mean here?
- shawnz 8y ago> If the answer is no, then what is the value to using semver? So that humans can get an approximate idea of the pain involved with any particular version upgrade. It doesn't need to be fully automated to be useful. Plus, just because it can't be fully automated now doesn't mean that it won't be in the future.
- moreira 8y agoThey... should be able to. Per SemVer rules you should be able to do just this. As an example, you should be able to upgrade from 2.0.0 to 2.25.99 without a single concern, because 2.0.Z is always backward-compatible bugfixes, 2.Y.Z means new features in a backward-compatible manner, and if -anything- ever breaks, then the major version would change, and you wouldn't automatically be upgraded to it. The only time that the answer would be "no" is if the project advertising itself as using SemVer breaks the expectation, since you have to trust that the developer actually knows how to use SemVer.
- alasdair_ 8y agoLet's say someone releases 1.2.3 and then, later, we realize that there was an obscure breaking change. Is the solution to release 2.0.0 and just hope that people realize the old version was broken? Or to release 1.2.4 with a fix that makes the change non-breaking again?
- 8y ago
- tolmasky 8y agoThe absolute most important thing they could do is add a fourth number, at the front, that is meaningless - the vanity number. vanity.major.minor.patch. There has been so much wasted time, and incorrect versioning, just because people have not "felt" that breaking changes constituted "major" semver updates - just to then break many production systems due to semver ranges only working iff major, minor, and patch actually attempt to mean anything. This is a losing battle -- we are never going to convince people of this. So let's just acquiesce. Let's allow the first number to advance at whatever rate you like. It's the "human" portion of the version number. That way, everything to the right of it, no one will care about and can serve its actual purpose. Ultimately this isn't even a new idea, its just "the PR version" vs. "the build number" just like native apps have had for ages.
- nerdponx 8y agoI don't see anything wrong with something like "Angular 2 (v1.3.6-a)". It's not a new version of the same software -- it's new software.
- tolmasky 8y agoJust to clarify, the real concern is the opposite of what you are showing, when the semver version advances faster than the "desired" version. So for example, something like Angular 1 (v2.5.6), because it contains a change that breaks 1.x.x users. Regardless, "what's wrong" is that people just don't behave this way, and there's no way to convince them otherwise. For better or worse, semvers have taken on the dual role of "build version" and "public facing version" (probably because that's the only version users actually end up seeing out in the wild). So there is tremendous resistance to advancing the MAJOR portion of the semver faster than their "marketing" desires. I have been in many, many, frustrating arguments on GitHub where there are several users that are begging to simply release a package under a MAJOR update instead of (erroneously) under a MINOR version, because it is incredibly difficult and confusing when a subdependency of a subdependency picks up a seemingly innocuous change which is actually breaking solely because "it still felt like it belonged in this major version", and the "fix" for this on the user's end is super complex - having to dive many layers deep in the dependency tree and wrestle with a lockfile - all because the change "didn't feel 2.0 worthy". In theory, if you can prove that a change breaks current users, there should be no further discussion, the change merits a major update. But you will be surprised how all of a sudden crazy unrelated arguments start popping up. Ultimately, its all because there is an emotional attachment to the leftmost number, simple as that. Look no further than Underscore's "romantic versioning" (https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e https://gist.github.com/jashkenas/cbd2b088e20279ae2c8e ) drama back when SemVer was first introduced, when it was stated that it would be ridiculous for underscore to be at "version 157" or something had they followed semver to the letter. But again, its only ridiculous because people want to attach PR value to the Major version. It is absolutely not ridiculous from the perspective of knowing that there were 157 breaking changes, and 157.x.y won't work with 156.x.y.
- Navarr 8y agoI'm surprised there's no involvement from PHP yet (although, who would be involved?) PHP's renaissance has a lot of thanks to give to Composer - our own package manager that has been fantastic. Composer should definitely be represented in the maintainer's group.
- steveklabnik 8y agohttps://github.com/semver/semver/issues/495 https://github.com/semver/semver/issues/495
- deleted 8y ago[deleted]
- FichteFoll 8y agoVery exciting to finally see semver get some traction in one way or another! A very welcome decision and announcement, also supported by Haacked's post[1]. [1]: https://haacked.com/archive/2019/02/11/semver-collective/ https://haacked.com/archive/2019/02/11/semver-collective/ I have been quite active around the semver repo for a few years after 2.0.0 was released initially and participated in a lot of significant discussions that, to this day, still remain unresolved without either affinity to them or a stated rejection. After many years of seeing the same questions and suggestions pop up with no progress in sight, I just slowly lost hope and once issue updates started piling in to close issues at the initiative of @jwdonahue (thanks, by the way) without advancing any discussion or subject, I just unsubscribed. I am really exited about the things that are to come and will gladly try to participate in discussions to the best of my abilities. Currently, there are quite a few things that SemVer needs to decide on (not necessarily implement), but imo the important points are: 1. How are versions selected? You mentioned this in the thread already, but this point is hugely lackluster about the current situation. See issue #205 for the biggest discussion to date and many cross-references. 1.1 Build metadata, especially in the context of version selectors, kind of "just exist". They serve mostly as a "catch all" for various things you might want to annotate a version, but there are no rules or use cases for them. 2. (Automatic) development/post-release builds come up frequently when trying to version snapshot builds, however Semver does not have a solution for this. See issue #200. 3. Clarify the "limbo" that are 0.x.y releases. To me, the spec is clear in its semantics for this, but the wording can be misleading to some. Basically, in the current situation semver just does not apply to 0.x releases at all (for the purpose of providing a "stable API") and this should be clearly communicated, especially for version selection. 4. Put more emphasis on what a "Public API" is, either in the spec itself or the FAQ. Many people have problems with this abstract concept and ask about it on the issue tracker. 5. Another topic that comes up frequently is demand for a "generation" or otherwise comparable fourth number to declare a kind of reboot for versioning. Some package managers have this (pacman, for example) and it is sparingly used, but there is no stance on whether or not SemVer would be interested in such an optional component or whether this is to be handled elsewhere. See issue #213.
- Perceptes 8y agoNice to see this happen. I'm glad that it will get more attention and some possible improvements. One thing I'd like to see is a specified practice for versioning projects that "wrap" another project where the "inner" project's version is significant to the user. For example, a long time ago I wrote a Ruby gem to expose jQuery's templating library to the Rails asset pipeline. My gem had a version, but each version also had the jQuery Templates source code packaged within it, which of course was also versioned. The most useful thing I could do for the gem's version was to have it match the version of JQT that it contained, but if I needed to make a new gem release to change some of the Ruby wrapper without changing the packaged version of JQT, there was no "official" or universally obvious way to denote this. I could add an extra number on the end, but it wasn't obvious that this extra number wasn't part of JQT's version just from looking at the four-part number. I believe some package managers use the name of the system in the "wrapper version" to denote this, e.g. "1.0.0.ubuntu4" but even that is lacking because you really need two represent two different fully semantic versions. I'd be great to see a solution for this specified.
- yxhuvud 8y agoThat may be more interesting than it looks like at its face, as that give a tie-in to declare dependencies on system libraries.
- int_19h 8y agoMy biggest problem with SemVer is that determining what is and isn't a breaking change can be very hard in modern languages. Worse yet, if the library is invoked from a different language, some things that weren't breaking can become so (and vice versa). And sometimes, said different language is actually a new version of the same language. For example, in C#, is adding a new overload to a sealed class a breaking change? The general consensus is "no", but doing that can easily break existing code by making it ambiguous (if there was only one implicit conversion or upcast to consider before, but now there are two). But what about adding a new method, with a completely different name - surely that's not breaking (to remind, our class is sealed, so there's no descendants; and in C#, methods don't override base class unless explicitly requested)? It wasn't - until C# 3.5 added extension methods. Now, every time you add a new method to your class, you are potentially breaking someone else's extension method with the same signature - and worse yet, it will compile silently, and just call a different thing. Okay, what about adding a new property? Can't be overloaded, and there's no extension properties (yet; they might still be added). There's still a problem: when calling an overloaded method with a lambda - also added in C# 3.5 - as an argument, one of the criteria for choosing an overload is that the body of the lambda is valid after substituting the types for that particular overload - this includes checking members. For example, suppose we have: class Foo {} class Bar { public void Frob() {} } class Program { static void Qux(Action<Foo> a) {} static void Qux(Action<Bar> a) {} static void Main() { Qux(x => x.Frob()); } } This compiles, because only Bar has Frob, and thus Qux(Action<Bar>) is the correct overload. But if Foo also gets some Frob at some future point, this code breaks - the overload is ambiguous now. In more complicated cases with other types involved, this can also result in a silent choice of a different overload. But, on the other hand, if you were to use the same class from F#, it wouldn't be a problem, because it simply doesn't try to do this sort of type inference on top of overloading. So for F#, this isn't breaking at all... today. It might be tomorrow, though, as it was with the extension method example above (F# didn't add support for those for a while after C# did, so it wasn't broken by that initially). I guess the TL;DR is that "breaking API change" is an oversimplification of the real thing - in reality, what's breaking depends on the entire toolchain and the way the library is used by the client code, not just the API itself. So our criteria for a major semver increase simply aren't well-defined. And that needs to be done - separately for various languages due to different semantics - before any given version number can be more than just one person's guess.
- trias 8y agoIs there something like "test-driven versioning"? It would be rather simple: "Here is the testsuite for our (public) api. We support the use cases tested, but no more. If you want your use case covered, please submit a testcase. If we change an existing test, we increase the major version. If we add tests, we increase the minor level. If the test suite remains the same and we only change the code, it's a patch-level increase." This could be verified automatically, increasing trust.
- steveklabnik 8y agoSemVer talks a lot about compatibility, but doesn't define it. Each project is supposed to on its own. You can just say this for any given project, and it would be compatible.
- slowmovintarget 8y agoI prefer Rich Hickey's definition of compatibility [1]: A function is compatible if it requires no more than it did, and provides no less than it did in the previous version. A library is compatible if it provides no fewer functions, and requires no additional context (transitive dependencies) to use it, and all of its functions are compatible as defined. When you wish to require more, or provide less, you make a function with a new name. [1] As linked elsewhere: https://youtu.be/oyLBGkS5ICk?t=1189 https://youtu.be/oyLBGkS5ICk?t=1189
- RyanCavanaugh 8y agoWhat happens if you add a testcase that passes in 5.3.2 (current) but fails in 5.3.1?
- yyx 8y agoNew feature added!
- baroffoos 8y agoI really really like this idea. Often I am wondering if something I am doing simply works by chance or if its an actual supported feature and as a developer I wonder if I can change something because someone might be depending on it. But I am left wondering something. How can you easily let people find out if their use case is included in the tests without having them read 20,000 tests.
- z3t4 8y agoSemVer is great, I think people try to read too much into it. It's there so that your automatic dependency system wont pull a breaking change without you first checking if it actually did break anything. I think waiting for semver major releases is an anti-pattern. I rather have a very small breaking change, rather then a bunch of breaking changes at once. So if you use SemVer, don't be afraid to do a Semver Major, avoid it if possible, but don't make it such a big deal. Ohh and don't use it for marketing, use a cool name instead, like NameOfProduct "ninja tiger" (instead of v9.2.2)
- _pedantry 8y agoGod, what an inane example of pedantry. I have an idea for a version string format, and you know what? I’m going to keep it to myself because it is obvious to me that know one could ever possibly care enough to read half a word about it.
- sifoobar 8y agoI have a soft spot for Semitic Versioning [0] myself. I don't know. Great artists know when to stop. I can't help but feel that this discussion crossed that line some time ago. [0] https://github.com/ajalt/fuckitpy#versioning https://github.com/ajalt/fuckitpy#versioning
- ilovecaching 8y agoI'm not sure if it's already in the spec, but it would be nice to get a very hard definition of when to call a project 1.0.0. It would also be nice to see it evolve to handle projects like Docker and Ubuntu, where Docker said goodbye to SemVer because it couldn't fit their use case. Also, SemVer seems too optimistic about major updates. After being in the industry for several decades, breaking changes are depressingly rare, and SemVer says basically nothing about this, or the fact that major versions include bugs-as-api-contracts.
- steveklabnik 8y agohttps://semver.org/#how-do-i-know-when-to-release-100 https://semver.org/#how-do-i-know-when-to-release-100
- jaydenseric 8y agoThe clause allowing 0.x releases to contain breaking changes needs to go. Also, the first release should be v1; so many projects never leave 0.x despite being depended on by millions of projects and everytime they push a new minor all hell breaks loose as people have to manually look at the changelog and decide to upgrade.
- jessaustin 8y agothe first release should be v1 If this were done, how would v1 be any different than v0 is now? Isn't it nice that people who want to avoid all that hell breaking loose can simply not use a package that hasn't gotten to v1? Why would you want to do away with that?
- ken 8y agoI find it quite useful. I've been bitten before when a system (Carthage) explicitly decides to be 'semver except that part', for some reason. All projects take a little while to stabilize, and this simply formalizes (the numbering of) that process. Any project can trivially opt out of it by simply starting with "1", as you suggest.
- kuon 8y agoI love how elm enforces semver versioning. When you write a library, it will detect API changes and upgrade the version accordingly.
- pjtr 8y ago1) In the Windows ecosystem almost every version has 4 parts. (e.g. file headers in exe, dll, assembly etc.) So it's impossible to use semver which only allows 3 parts. This seems like a major unnecessary roadblock. 2) IMO packaging tools should have fields to indicate the versioning scheme they follow, for example: { "version": "1.0.0", "version_scheme": "https://semver.org/spec/v2.0.0.html" https://semver.org/spec/v2.0.0.html" } { "version"="19.02", "version_scheme": "https://calver.org/" https://calver.org/") { "version"="1.0.0.0", "version_scheme": "https://altver.example.org/winver/1.0.0.0.html" https://altver.example.org/winver/1.0.0.0.html") { "version"="1.0.0.0", "version_scheme": "custom") Currently the tools pretend to know that "all" versions follow the same scheme. But in reality they just don't and never will. Maybe also allow a prefix instead, but make it explicit and unmistakable (i.e. not "v1.0.0", but "semver2-1.0.0").
- 1wd 8y agoSince for SemVer "to work, you first need to declare a public API" maybe tools should require a file VERSIONING (or SEMVER?) containing something like "<PRODUCT> follows SemVer 2.0.0.0 <https://semver.org/spec/v2.0.0.html> https://semver.org/spec/v2.0.0.html>. The public API of <PRODUCT> consists of ... We pledge to change the major version when we make incompatible changes to this public API. ... We consider the following as incompatible changes to the public API: ... We do not consider the following as incompatible changes to the public API: ..."
- cbsmith 8y agoI was curious about the empirical evidence supporting the notion that SemVer is "better" than what came before it. Does anyone have any pointers.