126 points · by tosh · 7y ago · 163 comments
The whole point of semver is that it allows people to know if they can upgrade version without hitting incompatibilities. So yes, this would be a 2.2 and those on 2.1 would know that they could upgrade to it without worrying about fixing their own integrations.
The calender version 19.1 tells me nothing other than when it was released, which is of no interest whatsoever when evaluating what it does. Sounds like a triumph of marketing over useful information.
No. Semver states quite clearly that "Major version MUST be incremented if any backwards incompatible changes are introduced to the public API.".
It does NOT state that the Major verson MUST NOT be incremented if the api has no backwards incompatible changes.
You can increment the MAJOR component of the version number at your will. So this is quit clearly a 3.0.0 release. Or it could be a 40.0.0 release and it would still be valid semver.
It’s like if you have a fire alarm that goes off when there’s a fire but which also goes off randomly all of the time. People are going to stop listening to it, because even though it reliably rings when there’s a fire the fact that it rings is unlikely to mean there’s an actual fire.
In the same way, if you keep incrementing the major version without breaking changes then people can no longer rely on the version number to be alerted about breaking changes.
By all means, increment your major version number when you feel like it. Just don’t call it semver. Because even if you are technically allowed to, it goes against the spirit / point of semver IMO.
Semver get 80% of the job done. The 20% will still suck but Pareto and I agree that it's a pretty good deal given the effort.
An 80% solution in this problem space is correctly interpreted as "there's a 20% chance an upgrade will break my business." From a risk-management perspective, at least calendared versioning implies that you'll have to do your own homework on which upgrades are incompatible, which is at least more honest than ineffective rigor.
I envision a much simplified alternative (or analogue) to the semver: there is a single decimal revision, and you should strive to be compatible back to the first revision. When you are willing to break the compatibility, you simply rename. This is similar to Go's practice but can be technically made compatible to the three-part semver (by encoding minor and patch versions to the decimal).
Generally though, I think for end user software, a "breaking" change is one that requires the user to relearn something, i.e it breaks an existing mental model.
Yet a cost based optimiser may break your application, completely.
Calendar Versioning prompts to update and highlights that you should test the behaviour every time, which sounds about right.
Also even a patch release of a SemVer library is allowed to be runtime incompatible. Throwing an exception on incorrect usage is down to the patch definition. It fixes incorrect (undefined) behaviour. Going from a O(1) to. O(n²) implementation to fix behaviour is also within SemVer patch level.
SemVer does not guarantee that your code will continue to work as intended after an upgrade. It only guarantees you don't have to change your code between minor versions.
Really if you're not constantly updating dependencies as part of your pipelines, you're going to quickly get into dependency rot issues.
Do it this way and save yourself the pain of zillions of updates when you HAVE to bump a package for a CVE.
https://martinfowler.com/bliki/FrequencyReducesDifficulty.ht...
You can get whiplash from conforming to every change in the winds.
Too many developers think banging out code as fast as they can is "doing their job well".
Old is bad, new is good. What else is there to understand?
Ugh. You'd think the creators of a multiregion database would realise half the planet has Autumn the same time as the other half has Spring.
> It also eliminates the mental gymnastics needed to figure out how old a release is
I guess not.
I guess I must have known they did have a real meaning, but my "consumer" grasp of them was more like vague marketing fluff that meant "will probably be out eventually"!
I'm similar to you, though I don't even have the excuse of living with different seasons - I just never really thought about it.
If someone says “coming in the Spring” I literally have no idea when that is. The dates of seasons are meaningless.
When you see a season mentioned in American marketing it basically means they have no idea. If a company says "spring 2019" it could mean sometime in April, or on June 20, hours before the summer solstice.
A JPL intern from Spain basically told me that the day end when sunset in Spain, it's very easy there. In California sunset can be around 5 pm and that's too weird for her. From the a quick google look, it seems like Spain daylight start from 6am or 7am and end around 8 or 9 pm. It's super interesting.
I'd say they're only 10% off
Thailand technically has three and people only really reference one (“winter”)
Also, I know “summer” means you get more leeway on when to actually release but is “mid year” or “late 2019” or “around November” really that hard, especially given that from what I hear, your seasons all start on weird dates?? (In Australia seasons officially start on the first of a given month)
So any definition that goes by some restricted American version (as pointed out by people living in the U.S. here) of seasons is not really applicable to 90% of the world's population. As you dig deeper into the climate of different countries, states/provinces, regions, etc., you may probably find your 90% figure drop to 10% or less.
> Ugh. You'd think the creators of a multiregion database would realise half the planet has Autumn the same time as the other half has Spring.
The season name will only be produced in marketing materials mainly targeting North America and Europe. The technical product will be named "19.1". The season name will not appear in an install.
Except that the rest of the world sees the exact same internet and the services are available online through the world wide web, something anybody from anywhere (barring cenorship) can see.
Even if Cockroach Labs delivers a different website to people outside North America and Europe that don't reference the seasons, the rest of the world will still manage to happen upon either those materials of other people who reference the naming scheme used by those materials.
Why not save the hassle and just not bother with the season naming at all? There's enough evidence from the comment section to show such a scheme was insufficiently thought through for an internationally-available product available online that likely has an international community of users who will very likely chat amongst themselves, referencing marketing material not intended for everybody's consumption.
I promote semver internally primarily for wiring together build automation. But I also try to make it clear that there can be a _completely different_ "product version" that can mean whatever the hell we want it to be. Calendar versions are great product versions.
Many people, frequently product managers, are very uncomfortable with this distinction.
So many places use the product version as "the version", which then becomes the main justification for monolithic version control, even for distributed applications or multiple product lines. So now, you re-build and/or re-deploy everything, even things that had no changes, purely to stay in sync with "the version".
There are usually good _technical_ reasons for monolithic version control, but doing it just to slap a product version on everything usually ends up with an alarming amount of waste.
Semver uses the version number to convey useful information. Getting rid of semver just eliminates that information.
If you want to bump versions for marketting, that's perfectly valid. Just use a separate product version.
My SVN commit numbers and git hashes also fail to convey useful marketting information, but that's no reason to get rid of them!
Keep those separate or have constant missunderstandings, arguments, and frustration. Sadly, I talk from experience.
False preconceptions: Historically major versions of software, pre-semver, had major new features. Many people still have the expectation that this will be the case. This still gets reinforced by many software products (as opposed to libraries). We'd all be surprised if Apple released a new iOS major version and it has no new significant features, but just breaks some APIs that had been deprecated. This is what server would dictate, but would break human expectations.
Enterprise: I am sure CockroachDB has support contracts with some larger companies. What are the terms? Are there some support durations that are based on major version numbers? Now majors aren't free anymore. Even if their support contracts don't care about major vs minors, you want your customers to upgrade ASAP, because the older the version you have to support, the more different is that code base from what you are actively working on and the fewer other customers will benefit. A fix on your latest version will likely be with the product forever, whereas a fix on a version that's three years old might not even be relevant to your latest. A major release in server has per definition breaking changes. So this won't be a zero-cost upgrade. Many enterprises in addition have much heavier procedures to upgrade a major dependency, especially for something like a database. This makes for a lot of reason not to upgrade. So now you need some very good carrots to get users to upgrade.
Even if you don't have paying customers, breaking changes without a big carrot can be a problem. Nobody wants a mess like Python 2.7 vs. 3.
It seems like CockroachLabs just has passage of time make the decision for them now. I'd be very curious to see how this will impact how far behind latest their customers will be.
> 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.
Calver side-steps this user bias.
Users shy away from major version numbers because they are allowed to change things in incompatible ways. When you jump a major version you're signaling that stuff might intentionally break, and they make their decisions accordingly. The solution is not to make your communication with user even worse!
Well, no, it just means users won't update at all, because every version could be breaking...
I think you mean "makes it impossible to know if a release includes backwards incompatible changes without looking at the release notes, while still having a release number say nothing about other aspects of the significance of a release."
The compatibility guarantees of CockroachDB do not change with this. It's always been the same: version X+1 will remain backward compatible with X but may break compatibility with X-1. Deprecation notices for definitive changes in version X+2 are introduced in version X.
That is literally impossible; a breaking change from X-1 to X+1 must have been introduced in one of the intervals X-1 to X or X to X+1. It the latter, X+1 breaks compatibility, if the former, let X' = X-1 and X'+1 breaks compatibility.
Presumably you mean that X always includes warnings about breaking changes in X+1, which is a vast improvement on some projects, but knowing that a problem exists doesn't mean it doesn't exist.
No, that's not how it works. The deprecation is introduced in version X-1; the new behavior is introduced but is opt-in; in version X, the new behavior becomes opt-out; in version X+1 the old behavior is removed.
You hear about about WPA3 being broken in April 2019. It's obvious your WPA3 18.10 lib is vulnerable, WPA3 19.04 is not.
It's a lot simpler to parse and can lead to less mistakes.
So the new version is 19.1 [API 2.2].
Most of this thread is debating the relative value of using a single number to communicate feature additions vs breaking changes, but these two things are (mostly) orthogonal. So use two numbers. This even allows releases where there are awesome new features but no API changes at all!
I wrote some code for a specialized piece of equipment earlier this year. One of the requirements on this equipment is that all package installs contain a unique version string (ie. you can't install the same version twice). So I based build versions on git hash and timestamp. This turned out to be a problem because it made it impossible to reproduce builds without hacking the build system clock. So I switched back to semver for releases.
$SOURCE_DATE_EPOCH was created exactly for your use case. https://reproducible-builds.org/docs/source-date-epoch/
calver has a number picked up when the release is produced, not when the build is run.
Testing that md5sum(software A) works just like md5sum(software A) is just pointless?
It fits good for marketing and for developer people.
Also there’s no such thing as Fall in a lot of places.
I don't care to research the country of the developer and then the dates that are considered summer in that country just because they were so ignorant they used a season as a timeframe.
One obvious case is bug compatibility and undocumented behaviour - it isn't that uncommon for software to depend on bugs or undocumented/unintentional behaviour. But if you're exposing a language like SQL, it's even messier. E.g. if cockroach added a new feature to the SQL dialect, then it could break downstream software that was assuming a particular SQL string would return an error. Or if you extend existing functionality, say supporting a wider range of arguments in some function.
There's also unspecified behaviour and implementation details - e.g. if a query without an "order by" happened to reliably return rows in a particular order before an upgrade, but it changes after an upgrade because of an algorithmic change, is it a breaking change? Common sense would say no, because it's not documented behaviour, but pedants could disagree.
And of course there's performance changes - if a query runs 100x slower after an upgrade, but returns the same result, is that a breaking change?
If you take the most pedantic interpretation of semver, you either have to bump the major version number all the time or you are very limited in how you can improve the software.
If version pattern is thought of as "compatibility.feature.fix" then there is no reason that feature and fix changes cannot also bump the right most number [as compatibility is broken].
EDIT: for clarity
That's WAI if you don't break compatibility.
I think the only reason behind moving is to have a better sense of progress or freshness. It seems like semantic versioning should support having some date on the minor numbers.
The entire spec is like a 10 minute read. Anyone using semver should have at least read the semver spec. Anyway, the bullet on tagging:
“Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85.”
The marketing team would probably even push further toward 1, 2, 3, or anything that could make a big splash once or twice a year. The product team would probably prefer dates because it makes their planning easier.
If I worked on a product that was version 2.1 when I started, and 5 years later was on version 6.5 without any actual rewrites or improvements in it, I would find that just as demotivating.
Edit: added Vista... thanks!
Not that I agree with ditching semver, but the way you stated it actually sounds like a good argument for doing it, not against. Sometimes marketing people have a point.
nobody cares about stability anymore. staying on 2.x by not breaking backward compatibility forever is a great feat to celebrate, sad to see marketing getting the best of it.
I personally like traditional versioning + security patches by date. but I'm on the minority.
This seems a pretty roundabout way to tell users they don't want to be backwards compatible anymore.
If they really wanted to communicate that clear without having to read extra docs they should have used 2019 version instead of 19.
> Our Spring ‘19
The world is big, bellow the line of the equator the seasons are opposite so that could lead to more confusion to the lower half of the planet.
In summary, whatever works for them, SemVer is not the clearly the winner in market share, so we as devs always have to check and double check when upgrading things but IMHO the arguments provided in the article are not strong enough to justify the move.
`npm install gun@0.2019.413`
This means no breaking change.
How old/new of a version you are on.
Month+day the bug got fixed.
It was the compromise between intense debates within the community. It is the one thing everyone could agree too.
Looks like it is already catching on! I hope more projects adopt it.
Cockroach Labs should rather copy Apple's model, free of hemisphere bias: Early 20XX, Mid 20XX, Late 20XX.
I've said it before: software is too complex to be described by three numbers. Write tests and read the changelog. The version doesn't matter at all.
Perhaps it's time to rethink this?
For years I’ve released things with semantic numbering but a YYYYMMDD build number.
Definitely year.month is superior.