The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

Semantic Versioning Will Not Save You

hynek.me
submitted
a year ago
byjustadevtoprogramming

Summary

Semantic Versioning (SemVer) claims that as long MAJOR doesn’t change (aka a major bump), nothing will break. In practice, the methodology is applied poorly, leaves its promises unfulfilled, and comes with a long tail of unintended consequences.

Python and Go packages are more likely to suffer from breakage caused by unintentional side-effects. You can’t rely on the semantic meaning of SemVer and you must treat every update as potentially breaking. Postponing problems is generally a horrible idea because most problems only get worse the longer you neglect them.

SemVer promises freedom, but in reality it delivers additional pressure and work. Maintainers can do whatever they want, as long as the major version is zero. That leads to many maintainers sticking to their beloved zero forever. Most open source projects don't have the capacity to maintain multiple major branches.

If you maintain a public package and pin the major version of a dependency of yours, you transitively do this to the applications of your users. In the case of security-sensitive projects – like cryptography but also web frameworks and their dependencies – this has potentially catastrophic consequences. Don’t ever pin major versions, unless you know they’re broken.

 web site, website, internet site, site-0
15

5 Comments

4
joseph
a year ago
An addendum to Hyrum's law is that you're not going to please everybody. They can easily remain on the version that works for them as stated by pinning a version. At some point you need to lose obsolete code.
2
justadevOP
a year ago
I will always maintain that it is what has made Windows such an annoying operating system.
2
joseph
a year ago
I couldn't agree more! Thankfully they've been moving towards really dropping the legacy stuff.
2
justadevOP
a year ago
About time! But I've moved permanently to Linux myself so I won't get to enjoy it
3
throwschen
a year ago
Too many devs become dogmatic about concepts like this