Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 27. Apr '17
last updated at 24. Aug '21

What Everybody Software Developer Should Know (1): Semantic Versioning

TLDR read http://semver.org/

As time goes, more of the software is reusing libraries and other software packages to do not create everything from scratch every time. Ruby has https://rubygems.org/, Perl has https://www.cpan.org/, JavaScript mastered reusability and we can find on https://www.npmjs.com/ milions of packages with really simple programs. Average node project depends on tons of 3rd party packages.

It is very important for authors of these packages to version their software properly - breaking changes should raise major version, backwards-compatible changes, but with new functionality minor version and bugfixes patch level. (e.g. Rails 5.1.1 - major.minor.patch level). An exception to this are versions with major number 0 (i.e. 0.15.1) - there can be any changes, including breaking ones - see http://semver.org/ for more details.

I personally think authors of all software should be responsible enough to properly version every piece of code. I know there are big projects like Linux kernel, when it’s not very suitable, but even bigger projects like Jenkins CI (https://jenkins.io/) should use proper versioning. Currently they release versions every week and it goes 2.53, 2.54, 2.55, … What I had to deal with recently was that version 2.54 started to require Java 8. And our CI stopped working. Yay, so much fun awaits!

If they used semver, the version would be 3.0, because it was a breaking change. Somebody already proposed in a JIRA ticket that they should consider to use semantic versioning (though I cannot find it now, after a couple of days :-/).

Please use semantic versioning. I (we, software developers) cannot track every change in every library we use. Or in software like Jenkins which should “just work” and build our projects. Thanks!

TODO: include semver here, it’s not very long

EDIT: semver in JavaScript world is good, but also sucks big time. Many times I have to add packages and versions to “resolve” section of package.json. Yes, pin that dependency to exact version!

Add Comment