When I look around, it seems that Clojure versions are a bit strange. I suspect due to Lein default template mostly. But so many libs begin at 0, or even double zeros 0.0.5
Now, I don’t mind the zero, my problem is why do we have three version numbers?
Lein doesn’t do version ranges, and I don’t think deps.edn does either.
For all that SemVer is criticized for, it seems to me much better then this random 3 numbers that mean nothing at all.
So I was thinking, and here’s a scheme I feel would be pretty interesting:
<clojure-version> is the minimum version of Clojure you depend on. And
<lib-version> is just a number you increment on any change: backward compatible bug-fix or feature.
The rule is: NEVER BREAK backward compatibility. The only exception to this is taking a dependency on a newer version of Clojure. In which case, the
<clojure-version> would get updated accordingly.
If you need to make a backward incompatible change, create a whole new lib with a number appended to the name:
my-lib-2 and then
my-lib-3. All namespaces MUST reflect this name change as well, to allow both old and new to coexist.