-
Couldn't load subscription status.
- Fork 5
Description
Many people on Reddit took issue with me recommending SemVer over the PVP.
I totally disagree about SemVer v. PVP Versioning.
https://www.reddit.com/r/haskell/comments/5iok3l/haskell_package_checklist/
I am obviously in favor of SemVer. I wanted some empirical data about Haskell package versioning. I wrote a script that downloads Hackage's package index and looks at the version numbers.
Found 10642 packages.
Number of version components => number of packages
3 => 4255
4 => 4638
Number of (version components, major versions) => number of packages
(3,1) => 3747
(4,1) => 4357
https://gist.github.com/tfausak/98726c8255c5bc5c940e0f4939978a43
I assume that 3 version components means SemVer and 4 version components means the PVP. That's not quite accurate since SemVer requires exactly 3 components but the PVP requires at least 3.
A package version number SHOULD have the form A.B.C, and MAY optionally have any number of additional components
Anyway, the PVP is the most popular versioning policy on Hackage. But SemVer is a very close second.
Of the 10,642 #Haskell packages on Hackage, 4,638 use the PVP and 4,255 use SemVer.
https://twitter.com/taylorfausak/status/811578904209227776
Most of the packages on Hackage never change their most significant version number. Only 9% have.
Of the 10,642 #Haskell packages on Hackage, only 921 have ever changed their most significant version number.
https://twitter.com/taylorfausak/status/811579159671668736
6% of PVP packages have ever changed their most significant version number. That's a lot less than the overall rate.
Of the 4,638 #Haskell packages on Hackage that use the PVP, only 281 have ever changed their most significant version number.
https://twitter.com/taylorfausak/status/811579605278670849
12% of SemVer packages have ever changed their most significant version number. That's a lot more than the overall rate.
Of the 4,255 #Haskell packages on Hackage that use SemVer, 508 have changed their most significant version number.
https://twitter.com/taylorfausak/status/811580634045026304
Those numbers make SemVer look less stable than the PVP, but it isn't a fair comparison. I need to update the script to look at the first two components of packages that use the PVP and compare that to the first component of packages that use SemVer.
Even as they are now, the numbers support a point I want to make: The PVP gives unnecessary freedom that most packages don't even use.