I personally prefer Semver. I think it's reasonable, simple, and makes sense. But as a good Haskell citizen, I'd like to be PVP-compliant as well. Here is a bit of a graphic showing how the two systems are almost the same:
PVP: A . B . C . ...
Semver: Major . Minor . Patch
^ ^ ^
| | |
| | ` increment for other changes
| |
| ` increment on non-breaking change
|
` increment on breaking change
Basically, PVP's A
is useless from a compatibility standpoint. It's just a bystander in the "increment A.B
for breaking changes" rule. So I just set it to 0
and never change it. The remaining 3 components then follow Semver.
So for any of my packages, you can interpret versions as: 0.Major.Minor.Patch
Okay, I think I know what I will do.
I follow semantic versioning just the "normal" way. And my automated release process only has to be slightly more complex than it usually is.
For each release:
0
and not suffixed with a pre-release tag):0.
. Or maybe I will pick something different in order to remove the "unstable" feeling that we have when looking at version number starting with0
. Maybe I will prefix it either1.
or42.
And finally, I simply don't publish non-final versions to hackage, forcing users to depend on the git repository directly.
For versions that are not published, I don't write any version number in the cabal/stack file.
Not being able to share work in progress is a shame, but I don't see what else I could do...