What is the difference between minor and patch in PVP?

On the PVP homepage, there are mentions of “patch-level” changes, in an example. In the A.B.C.D versioning system, would the D then be the patch level? Why does PVP mention patches at all, wouldn’t it be enough to distinguish major from everything else? I don’t understand why we couldn’t do with a more limited vocabulary in PVP.

It seems to me, that if the major version matches, then compatibility is assured. If we start distinguishing some minor changes from others, what have we gained? I suppose in practice, one could imagine minor/patch level changes that are more or less invasive. For example, people that are opposed to Hackage revisions could republish the package with updated bounds with only a patch level bump, and they’d argue that this is less risky than a source change which might affect optimization. But this is surely out of scope for the PVP, right?

If you export a new identifier then PVP requires you to bump C but not B. If I have imported your module unqualified then this new identifier can cause a naming conflict, so I am not guaranteed compatibility just by matching A and B.

2 Likes

“patch-level” is used as ”a minor-version bump”, so C. I suspect it is borrowed jargon from SemVer, I would prefer “minor-version bump” for consistency and clarity.

PVP only mandates A.B.C (where A.B are for breaking changes, C for non-breaking changes).
Anything that comes after C at the discretion of the maintainer. This includes semantics: in most of the packages I use from Hackage D is stands for “trivial changes”.

2 Likes

I made a PR which should make the document clearer. Improvements and comments welcome.

2 Likes