BreakVer
)Semantic Versioning
(SemVer
) has some practical issues:
Net effect: many people using SemVer
don’t follow it
strictly[1], undermining the value of having a spec in the first
place.
[1] If everyone followed
SemVer
strictly, you’d see a lot more code at version18.y.z
. If you’ve ever released code with ANY breaking change without bumping your major version number, you’ve violated the spec and potentially surprised someone with a breaking change that they weren’t expecting.
As an alternative, I suggest the following trivial spec which I use for my own projects:
<major>.<minor>.<non-breaking>[-<optional-qualifier>]:
------------------------------------------------------
<major> - Major breaking changes [or discretionary "major non-breaking changes"]
<minor> - Minor breaking changes [or discretionary "minor non-breaking changes"]
<non-breaking> - **Strictly** NO breaking changes, ever (!!)
<optional-qualifier> - Tag-style qualifiers: -alpha1, -RC2, etc.
This is intended to be comfortable to follow strictly, so more likely to be reliable in practice:
Bump | Implies |
---|---|
<non-breaking> |
Safe upgrade, always - just do it |
<minor> |
Might break code in a minor way, check CHANGELOG |
<major> |
Might break code in a major way, check CHANGELOG!! |
Note that this spec emphasizes the maximum amount of damage a version update could inflict.
There’s only 2 types of version bumps:
Is it possible that your change (bug fix, new feature, whatever) could break anyone’s code?
<major>
or
<minor>
(your choice).<non-breaking>
bump is strictly
disallowed!
<major
>,
<minor>
, or <non-breaking>
(your
choice).There’s an old joke that every change is breaking for someone.
In practice, most changes are on a spectrum from:
You’ll need to use your judgement in some cases, but always
err on the conservative side. BreakVer
’s value
comes from the reliability of its <non-breaking>
semantics.
Is there a non-trivial likelihood of even
approximately reasonable code being broken by the change? If
yes, then a <non-breaking>
bump is disallowed.
The BreakVer spec will be hosted at: www.taoensso.com/break-versioning 👍