News for hackers. Stuff that matters.
Re:CalVer: Calendar Versioning by skrebbel on Monday January 06, 2020 @06:32AM (#21968327)
Any opinions on calver vs semver for, say, open source projects or APIs/SDKs?
Re:CalVer: Calendar Versioning by 33degrees on Monday January 06, 2020 @08:52AM (#21969090)
For APIs, calver can make a lot of sense, as detailed in Stripe’s blog post on the subject https://stripe.com/en-ca/blog/api-versioning
Re:CalVer: Calendar Versioning by SahAssar on Monday January 06, 2020 @06:30PM (#21974746)
That's just because they keep compatibility basically forever (they build middleware to transform older versions to new ones). If you actually want to remove old versions not so much.
Re:CalVer: Calendar Versioning by meddlepal on Monday January 06, 2020 @10:47AM (#21969972)
This is great, thanks for sharing.
Re:CalVer: Calendar Versioning by peterwwillis on Monday January 06, 2020 @11:16AM (#21970272)
Semver is used for regular releases when you need to communicate deeper information to multiple consumers. A library version usually needs to communicate lots of information, to developers, to users, to distributions. Maybe this release is a dev release, while this other is stable, this release is LTS while another is not, this release has breaking changes, this one doesn't, etc.

Calver is used when you don't care about anything but the temporal difference between releases, and you can basically toss any expectation of compatibility between versions, other than something temporal ("this version is compatible with previous versions for up to one year"). That's why APIs use it.

Generally speaking, OSS uses Calver when the releaser doesn't need to care about the consumer, compatibility, etc. You'll find Linux system packages using Calver when someone basically cloned a random Git repo, made a one-off build, and decided "this will be a release" (you find this with firmware a lot), or as a way for 3rd parties to fork an official version with patches.

Random assortment of Ubuntu packages with a variant of Calver (sometimes along with Semver): libargon2, gyp, aspell, language-pack-en, libcrystalhd3, ntfs-3g, x11proto-* , python-cliapp, net-tools, rtmpdump, iputils-*, dh-python, amd64-microcode, lsb-release, libstring-escape-perl, wireless-regdb, ubuntu-keyring, tzdata, fonts-vlgothic, usb-modeswitch-data, publicsuffix, autotools-dev, geoip-database, ca-certificates, dns-root-data

Re:CalVer: Calendar Versioning by pseudalopex on Monday January 06, 2020 @04:42PM (#21973689)
tzdata and several other packages in that list use dated versions because they have very strong expectations of compatibility.
Re:CalVer: Calendar Versioning by wufocaculura on Monday January 06, 2020 @07:04AM (#21968501)
No strong opinion here, but I see calver as a good fit for a new / rapidly changing project (with yyyymmdd being a both version and snapshot date), or for a software where you don't need semver guarantees about api change - so not for a library or for some important tool that is often scripted.

Or, as described in the project, calver might be good as a release date for a "umbrella projects" - like Ubuntu, or even Windows 10 builds.

Re:CalVer: Calendar Versioning by vegardx on Monday January 06, 2020 @06:48AM (#21968402)
Semantic versioning tells you a lot about the state of a release. Is it supposed to break backwards compatibility or does it just add new or patch existing backwards compatible functionality? I think that sort of stuff is more important than on what day the release was made.

For an API it seems like a no-brainer to use semantic versioning, makes it easier to document feature deprecation, like supporting latest two major releases and so on.

Re:CalVer: Calendar Versioning by capableweb on Monday January 06, 2020 @07:32AM (#21968618)
Something like CalVer forces you to consider every version breaking and puts the responsibility on you to ensure compatibility with your project.

SemVer puts the responsibility on the maintainer to assume how users are using the library.

I think by now we've learned that even though SemVer was a good idea, people are people and they are gonna eventually fail at setting the version correctly, making your assumptions broken

Re:CalVer: Calendar Versioning by rtpg on Monday January 06, 2020 @08:22AM (#21968906)
Semver still communicates intents pretty well. Well run projects will even roll back changes that ended up being semver incompatible

Treating every patch release of Django like a major release would be a major waste of time compared to “assume Django maintainers have a good idea of how things are used, and rely on automated test suite”

Re:CalVer: Calendar Versioning by capableweb on Wednesday January 08, 2020 @01:01PM (#21993968)
> Semver still communicates intents pretty well. Well run projects will even roll back changes that ended up being semver incompatible

That sounds either worse. Software releases should be immutable, so no changing existing versions.

And also, if X.Y is incompatible (because they screwed up the versioning, as in your example), X.Z should also be incompatible (according to semver), otherwise you break semver twice instead of just once...

> Treating every patch release of Django like a major release would be a major waste of time

Yeah, I guess computing time. If you manually testing each dependency update, your doing something wrong. This should be automated to such level as you feel comfortable stuff is working by just running the tests.

Re:CalVer: Calendar Versioning by marcosdumay on Monday January 06, 2020 @02:40PM (#21972387)
Using a library puts the responsibility on you to ensure compatibility.

With SemVer the library maintainer tells you "here, let me help you". With CalVer the maintainer says "fuck that, I'm out". None changes your responsibility.

Re:CalVer: Calendar Versioning by vegardx on Monday January 06, 2020 @08:20AM (#21968892)
That can be said about any versioning scheme. The idea that making things inconvenient suddenly makes people do the right thing is pretty naive, if you ask me.

Semantic versioning lets the user decide.

Re:CalVer: Calendar Versioning by thebeardisred on Tuesday January 07, 2020 @05:02PM (#21985489)
At CoreOS (circa 2013+) we used something ideologically similar to CalVer but with tweaked semantics.

As per our documentation (https://coreos.com/releases/): CoreOS Container Linux version numbers are determined by the number of days since the CoreOS epoch, July 1, 2013, at the time the release is built for the Alpha channel.

There were definitely challenges but it provided a rigorous method to ensure monotonically increasing values. It had a useful side effect of getting people out of the habit of "caring" about which version they were running and instead allowed us to focus on simply "being up to date."

Re:CalVer: Calendar Versioning by fnordsensei on Monday January 06, 2020 @07:01AM (#21968476)
AWS seems to use a variation of calendar versioning for some of their APIs. In practice, it seems perfectly fine.
Re:CalVer: Calendar Versioning by meddlepal on Monday January 06, 2020 @01:20PM (#21971514)
As does Azure