12 ms·
Semver doesn't mean major.minor.patch, it means fails.features.bugs
- tedajax 5y agoWhat an abysmal mindset.
- chomp 5y agoCan you explain why you don’t like this?
- 3np 5y agoHow so? It's precisely as intended. Here's thesemver summary: Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. https://semver.org/ https://semver.org/
- one_off_comment 5y agoI'm not tedajax, but my guess as to what they meant is that it's an abysmal mindset to think that making a breaking change to an API means that the previous API was wrong. And I tend to agree. Needs and assumptions change and sometimes that means your API needs to adapt in a backwards-incompatible way. That doesn't mean your previous API was wrong for what it was built for. It just means it's wrong for the new expectations. I agree with tedajax that looking at any breaking changes as a failure is a pessimistic, fatalistic, harmful viewpoint... assuming that's what tedajax had in mind.
- simonw 5y agoThe API was wrong. If you were an omniscient being with complete understanding of the future when you designed it, you would have known that.
- 3np 5y agoNot necessarily. See my comment above. Needs change. Breaking an API can be reasonable to accommodate for that. It does not mean the past decision was incorrect even with current knowledge.
- simonw 5y agoThat's my point: "Needs change". If you were a supernatural omniscient being with full knowledge of all possible pasts and futures you would have predicted that need. Since none of us are omniscient it's OK for us not to build the perfect API the first time round!
- 3np 5y agoMaybe I’m building my API for the users and use-cases for today and next year, intentionally not accommodating for those in 10 years. Those will be addressed in an upcoming breaking release at some point until then. This can be a sane decision even if you have full knowledge of what’s coming.
- 3np 5y ago“Fail” is an overloaded word. The new version fails under the previous versions API. That doesn’t mean that there is anything wrong with either old or new release or API, just that there are breaking API changes and it should not be considered a drop-in upgrade before properly reading through release notes. There’s no implication of failure. Like you say, it happens.
- Stampo00 5y agoThe tweet literally says: >The thing about semver major version numbers are that they don't mean new stuff, they're a permanent reminder of how many times you got the API wrong.
- tedajax 5y agoYeah that's pretty much what I had in mind. I'd add further that more than likely once your API became something usable new use-cases and ideas came up. I wouldn't call major version numbers "failures" but "evolutions". The context of your project changing over the years requiring breaking API changes is good and healthy.
- andrew_ 5y ago> they're a permanent reminder of how many times you got the API wrong I'd agree in part with this sentiment only for the last segment: PATCH. Otherwise, unless you're just producing a mountain of garbage on a routine basis, they're more an indicator of _improvements_ in an API or a versioned thing. As it goes with Twitter, the tweet author didn't provide nearly enough nuance to justify the statement.
- one_off_comment 5y agoYou're correct. As usual, the truth lies somewhere in between the two extremes. People seem to really hate the gray area despite the fact the most of life lies in it.
- BoorishBears 5y agoThey don't hate the gray area, they pretend to hate the gray area because the gray area doesn't get you on the front page of HN
- 0des 5y agoIs there a word for this level of meta-analysis?
- YawningAngel 5y agoCynicism, perhaps?
- BoorishBears 5y agoI prefer realism. I mean just read the tweet again, but ignore the zingy psuedo-snowclone X.Y.Z If someone told you "every breaking change to your API is a failure", would you give them the time of day? But repackage that frankly useless opinion in a zinger and suddenly you have people spending hundreds of comments slowly working backwards to a more nuanced commentary that no longer has anything to do with the original point... - Seriously look at their reply: > I'm watching with amusement as this tweet spreads and it turns out a decent proportion of people are finding it really offensive - feels like people are OK with learning from their mistakes but not with learning from their failures ... what? Because people don't agree with your "hot take" that breaking changes are a failure, they... are ok with making mistakes. But also not ok with failure. Pass me a little bit of whatever it took to make this seem profound? - Why do we give this kind of drivel room? Why give the time of day to an opinion so bad that you need to have a 10 level deep conversation to come up with something resembling a useful take from it? I guess because we're bored?
- rolha-capoeira 5y ago"How many times you got the API wrong"? I get the concept, and maybe it's correct some of the time... but it ignores the vast majority of software releases over time, which are evolved products/projects. What I initially set out to do != what's valuable/useful to the world.
- simonw 5y agoSo you got the API wrong - because you didn't have omniscience about every possible problem your code would need to solve in the future. There's no shame in admitting that with a major version bump. None of us are infallible.
- qzw 5y agoSo Chrome has had 92 fails and around 70% of the browser market. Guess I’m not failing enough then. [edit] Yes, I missed the semver part of the tweet. This is why I’m not on twitter, and should stay out of these threads in the future.
- simonw 5y agoChrome doesn't use SemVer.
- tobyjsullivan 5y agoMaybe not technically semver but it seems close enough for the joke to hold. https://www.chromium.org/developers/version-numbers https://www.chromium.org/developers/version-numbers
- 3np 5y agoTo anyone who think they disagree: The tweet is not really an opinion or a hot take, just a rephrasing of the semantics (you know, the sem in semver). Read “Fails” as verb and not plural noun and it makes sense. Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards compatible manner, and PATCH version when you make backwards compatible bug fixes. https://semver.org/ https://semver.org/ The idea is that users can get expectations right when assessing an upgrade and plan accordingly. If you don't follow this, you're not doing semver.
- dancemethis 5y agoNah, it means "boring", "yawn" and "soulless".
- AnIdiotOnTheNet 5y agoIf more developers had had this mindset, DLL hell might not have ever been a thing.
- shadowgovt 5y agoOh, you can definitely get into DLL hell with semantically versioned APIs. DLL hell is mostly a symptom of diamond dependency problems... One library cares deeply about the version of a dependency, a second library cares deeply about a different version of the same dependency, and your code requires both of those libraries.
- simonw 5y agoI absolutely love this (I was part of this Twitter conversation). My take on SemVer is that the ideal version number would be something like 1.452 - 452 new feature release without ever breaking backwards compatibility. Almost impossible to actually achieve this, but it's good to be ambitious! Also: doing SemVer properly requires you to provide really good documentation. A bug fix should correct an issue where actual behavior differs from the documented behavior. Without this, a "bug fix" is indistinguishable from a breaking change.
- neolog 5y agoWhy break the existing library instead of making a new one? Concretely, why not do like jinja2 and psycopg2?
- simonw 5y agoBecause then you have to actively maintain two libraries forever instead of one.
- neolog 5y agoNo I don't, I can always stop maintaining a library. But I don't have to actively break it either.
- simonw 5y agoIn that case the maintainer can release version 2.0 and have a note in the README that says "if you don't want the breaking changes in 2.0 here's how to install the last release from the 1.0 series - note that this series is no longer maintained so any bugs or security issues will not be addressed."
- blacktriangle 5y agoThat's the price of writing maintainable software.
- ajmurmann 5y ago
- treesknees 5y agoAt my previous employer, we ended up handing over our versioning to the marketing/business teams and our development teams started using a semver-style internally recognized release number for tracking features and fixes. Too often our customers would demand a new feature/driver/interface in a .PATCH or .MINOR release in order to more quickly adopt the software without having to run through their internal qualifications and upgrade policies.
- happytoexplain 5y agoYup. We use code names for products internally for the same reason. Never use a user-facing value as an identifier, as obnoxious as trying to adhere to that can be.
- crazygringo 5y ago> they're a permanent reminder of how many times you got the API wrong. I mean, that's clever for a tweet, but I hope nobody takes that seriously. It's pretty counterproductive to view design through the lens of getting something wrong or right. There's just iteration in the direction of improvement. It didn't start out wrong -- it was your best first attempt with what you knew at the time. Then you learned more and so it improved. But it'll never be "right", just incrementally "more useful". API's aren't mathematical proofs. Just in case anyone needs to hear it ;)
- simonw 5y agoI wonder if people would be less offended by this if it was "MISTAKES.FEATURES.BUGS". In American culture (in my experience) everyone takes pride in learning from their mistakes - but no-one likes to think of them as failures.
- jayd16 5y agoPAST-MISTAKES.FUTURE-MISTAKES.CURRENT-MISTAKES
- theli0nheart 5y agoNailed it. Everything becomes a mistake eventually.
- inanutshellus 5y ago"You[r feature] Either Die[s] A Hero, Or [it] Live[s] Long Enough To See [it]self Become The Villain" ~Harvey Dent [Sorta]
- eurasiantiger 5y agoThat’s surprisingly applicable. I’ve definitely seen this happen more than a few times.
- 5y ago
- dragonwriter 5y ago> Semver doesn't mean MAJOR.MINOR.PATCH, it means FAILS.FEATURES.BUGS It think I understand all the projects afraid to go to 1.0: “0 fails”!
- BenjiWiebe 5y agoMy projects stay at 0.x because they never quit failing...
- 0des 5y agoI disagree with the author. However, I don't think this was meant to be taken literally, but more as a tongue in cheek observation of the poster's perception of their own situation. As an aside, recently, I've started doing YYYY-MM-DD for releases. I don't know why, but that's how I ended up subconsciously, after using semver for years. Currently, I version the API, and date the release. I have not yet had the audacity to pull this off in any larger projects, but small tools, internal releases, who's going to judge for trying something new where the risk is low? I'm not saying it's right, just that it works for me.
- jka 5y agoIn an imaginary world that is not very much like our current world of software development, there are no version numbers at all - only commit references. You generally want to upgrade to the latest high-quality commit reference available, by following an upgrade path from the commit your application is currently deployed from. Breaking changes can be identified automatically using static analysis of the commits thanks to language-level support and/or well-defined interface definitions. For all of the important workflows you use, you have external integration tests, so you can navigate the commit-space (and potentially even merge multiple paths) fairly arbitrarily with some degree of both statistical (test coverage, performance) and qualitative (feature support, hardware compatibility) confidence.
- mjw1007 5y agoUsing semver is a promise that if you make a backwards-incompatible change you will update the major version. That's entirely separate from any promise, or statement of intent, that you might want to make about whether you're hoping to make backwards-incompatible changes rarely or frequently. Teaching people that they should consider incrementing the major version as indicating a failure isn't going to be helpful. In practice, given the way semver is defined, if this idea catches on I fear the main effect will be to increase the number of projects that never choose to declare they're version 1.0.
- mjw1007 5y agoMore concretely, scrolling up I see that the tweeter says their threshold for declaring 1.0 is when they « feel that the API will only need to be extended in a backwards compatible way. When taking care not to break people's code is not a burden. » I don't think that's the general understanding we should be aiming for. Rather I think a better threshold (and the one implicit in semver's definition) is to declare 1.0 when the API is stable enough that you're willing to go to the effort of tracking whether the changes you're making are backwards-compatible. Otherwise we're discarding useful information in the meantime.
- simonw 5y agoSo in your model 1.0 is the point at which you start writing proper release notes? I'm not keen on that. During my 0.x period I still want interested third parties to try out and use my code, which means I need to give them good release information to help them help me test everything out.
- mjw1007 5y agoYou can start writing release notes any time you like. The idea of semver was that you use the version number to encode compatibility information, and stop using it as a vague indication of the maturity of the project or the size of the changes in a particular release.
- ajmurmann 5y agoI find this framing to be too inward looking. SemVer isn't for me as the library developer, it's for users of my library. What it really means in that context for most users/customers outside of toy projects is: EXPENSIVE-HIGH-RISK-UPGRADE. MEDIUM-RISK.LOW-RISK There is a carrot-side to this but that usually only matters in specific cases for a subset of users. EDIT: one small practical addition: If you are fixing a big that requires very large changes to how things work at a more fundamental level, I'd at least think twice about shipping that in a patch. While it technically fits the definition of SemVer, it might violate implicit expectations of users who are using your library in production. The change really needs to carry its weight.
- andrew_ 5y agoI like the thought process here. In theory MINOR and PATCH are both supposed to be low risk. The risk only increases if the developer/process in control of the versioning doesn't recognize when a fix or feature contains a breaking change.
- mrits 5y agoMARKETING.PM.ENG is closer to my experience
- ithkuil 5y agoSomebody should come up with a name for this and craft a manifesto on a website :-) Realver.org? Enterprisever? Corpver?
- dlor 5y agoHah! I had something similar awhile ago: https://twitter.com/lorenc_dan/status/1209289792569131008 https://twitter.com/lorenc_dan/status/1209289792569131008
- BeefySwain 5y agoI particularly love your followup: https://twitter.com/lorenc_dan/status/1209290259386769408 https://twitter.com/lorenc_dan/status/1209290259386769408
- pipework 5y ago0. Time since last Intentional-Breakage/Funding-round. 1. "Features" released since last Intentional-Breakage. 2. Acknowledged mistakes since last "feature" release. 3. Scuff-ups since last mistake or "feature". 4. Comical 'release name' to distract management from size of last two numbers. 0.1.2-3-haffagudtay
- 0xbadcafebee 5y agoThis is literally the only tweet I've ever seen posted to HN that was worth upvoting. It's not an entire book spread over 200 posts, it's just one nugget of useful info
- profmonocle 5y agoIn the Node.js ecosystem, major semver bumps often just mean that support for an EOL version of Node was dropped. Which is a good thing IMO - allows the devs to use modern JS conventions without as much transpiling overhead.
- deleted 5y ago[deleted]
- willm 5y agoTweet author here. Please don’t @ me. I was only half serious. The context was re Python libraries. I increase the major version when I revise the API, even if it’s single method. To my mind, that is a failure on my part to come up with the perfect API on the first pass. Of course it’s going to happen and I don’t lose sleep over it. I’m not dissing any project that doesn’t start with a 1.!
- kirse 5y agoIf an API is like a painting, then a changing landscape could be one reason you can paint it accurately each time but still need to make later revisions. "All models are wrong but some are useful" applies here as well. Most of SW iteration is about adjusting the painting/model to match present realities. Either way the tweet cracks me up because it's just a matter of perspective that is giving some folks a good rankle.
- j1elo 5y agoPeople are just reacting strongly to a word that I guess in their culture has too many negative connotations. Your idea was pretty much on point and made for a fun tweet, and I think it's good enough without needing to split hairs between the slightly different possible interpretations of the word, as some are doing.
- didibus 5y agoBREAKING.FEATURES.BUGS I think would be better. And when you look at it that way, BREAKING could be in order to provide new features that necissated breaking changes, or it could be because the old way sucked and nobody liked it, or any other reason, but the version bump communicates that the changes are breaking backwards compatibility in some known way. As an aside, this is why some people say SemVer is bad, because ideally a dependency should never be breaking you. An alternative to SemVer is to do: FEATURES.BUGS and simply never push breaking changes. So what if you want to make some changes that mandates breaking compatibility? Well you simply release a new library or framework under a new name. That way the name of a dependency is a 1:1 correspondence with its exact interface. If the interface changes in breaking ways it's a new dependency. This also allows you to then depend on both, possibly even letting you transition from one to the other in phases.
- lolinder 5y ago> So what if you want to make some changes that mandates breaking compatibility? > Well you simply release a new library or framework under a new name. I don't think that's necessary. If you use the model you propose (BREAKING.FEATURES.BUGS) and steer very clear of breaking changes until absolutely necessary, then "Framework 2" becomes in a very real sense a new product while still conveying continuity of development team, ideas, etc. I think of Vue 3, Python 3, Bootstrap 5, or Fontawesome 6. No one would make the mistake of thinking they could just update the version number and be on their merry way. They're treated as "new dependencies", in effect, but re-using the name makes it still obvious that it's the same team and philosophy behind the new language/framework. One aspect of each of the projects I list above is the continued commitment to maintenance on the old versions, with security and bugfixes and with the old documentation still being available for years after the new version is out. This allows organizations to treat the new major version as a new dependency, with all the caution that entails, without fear of having the rug yanked out from under them.
- travisjungroth 5y agoAfter thinking about this topic too much, I've come to the same answer you have except you've said it better. (Although I disagree on people not thinking they can upgrade majors no problem. That for sure happens). If you think every breaking change should have a new name, as the person above you does and I've heard come out of the Clojure community, then just append the major version number to the product name in your head. Otherwise, what do you expect them to name it? A name that kinda reminds people of the first one? If it's mostly the same group of people solving mostly the same problem in mostly the same way at a later point in time, NAME N -> NAME N+1 captures that better than anything else. For all the shit we give the Python 2 to 3 upgrade (and they give themselves) I have never heard an alternative that I really find satisfying. It seems the problem was: We want to stop working for free on this old stuff we don't like any more. We want to keep the name, the websites and t-shirts since we own them and we're doing almost the same thing. Every answer I hear wants the people working for free to give up one of those reasonable things.
- bryanmikaelian 5y agoReminds me of the talk Rich Hickey gave about Clojure Spec and why semver fails. https://youtu.be/oyLBGkS5ICk https://youtu.be/oyLBGkS5ICk
- dmitriid 5y agoI strongly encourage people to use ComVer instead: https://gitlab.com/staltz/comver https://gitlab.com/staltz/comver It's <BREAKING CHANGES>.<100% BACKWARDS COMPATIBLE CHANGES> That's it. Fully SemVer compatible, if you want (just add .0 at the end)
- JamesSwift 5y agoShould I read the release notes in depth? DEFINITELY.PROBABLY.POSSIBLY
- greggyb 5y agoThere's a really good Rich Hickey talk about versioning. Agree or not, it's a great prompt for considering what you want from versioning. https://www.youtube.com/watch?v=oyLBGkS5ICk https://www.youtube.com/watch?v=oyLBGkS5ICk
- tialaramex 5y agoI don't buy that the need to bump Major is a failure. This is particularly true if you continue to maintain the previous major version to the same degree (if any) that you maintain the new one, and especially true if you have an explicit release lifetime strategy. If I tell you that misfortunate 1.x will be actively seeing new work until 2025 and then bug fixes until 2028, and I deliver, misfortunate 2.x doesn't break that promise. Maybe you wish a new feature from misfortunate 2.6 could have been in 1.34 instead, but too bad I never promised that and most likely the way I did it would be incompatible with 1.34 anyway. I also think that people underestimate how bad bugs can be. Sometimes the minimum fix is a breaking change.
- m0llusk 5y agoPosting on Twitter is a red flag indicating the author has a weak grasp of the material and nothing significant to contribute.
- karmakaze 5y agoIf those are the axes, then it should really be fails.bugs.features since new features can be safely added but changing an existing function which had a 'bug' can be unpredictable.
- nrvn 5y agoThis is exactly what https://www.conventionalcommits.org/en/v1.0.0/#summary https://www.conventionalcommits.org/en/v1.0.0/#summary advocates And this is exactly what https://semver.org/spec/v2.0.0.html https://semver.org/spec/v2.0.0.html implies. Happy coding!