haskell / pvp

Haskell Package Version Policy (PVP)
http://pvp.haskell.org/
38 stars 26 forks source link

Version the PVP spec itself? #19

Closed tfausak closed 5 years ago

tfausak commented 7 years ago

The PVP spec is not versioned. That makes to hard to talk about precisely at any given point in time. I usually link to a specific commit on GitHub to make sure that the content doesn't change, but that's a workaround at best. It would be nice to be able to point to pvp.haskell.org/1.2.3 for a consistent view of the spec.

By comparison, SemVer is versioned and went through a breaking change a while ago: http://semver.org/spec/v2.0.0.html

I bring this up because as the PVP spec changes (like with #18), it's important to be able to talk about things before and after the change in a precise way.

hvr commented 7 years ago

That's a sensible thing to do, and it's in fact one of the items I intended to address at some point....

But the reason I stalled so far is that it's not obvious to me which versioning scheme to apply to the PVP itself, and my brain hurts a little bit trying to think about what a formally sound scheme would be here, given the self-referential aspect... :-)

An informal scheme would maybe be to use a simplistic 2-number-component scheme (which makes it obvious that this is neither SemVer nor PVP). That version would only track semantically relevant changes (i.e. typos/layout etc which doesn't change the meaning would not be reflected in the version). IOW, we'd use a "major.minor" version; where "major" denotes breaking changes, and "minor" bumps denote "less breaking" changes. The big question is how to define what is a major breaking change to the versioning scheme, and what can be considered a "benign" minor change.

A trivial unstructured scheme would be to simply version by consecutive natural numbers, or alternatively by date (e.g. 20170922), but that's ugly imho.

One thing we can do once we have meta versioning is that we can annotate the pvp-version applying to a specific release inside the respective .cabal file by e.g. a "x-pvp-spec: 1.0" field; this would be rather essential for upcoming pvp validation tooling.

tfausak commented 7 years ago

I don't have a strong opinion about the versioning scheme PVP itself uses. Something based on dates or increasing natural numbers seems fine. Obviously I'm in favor of SemVer, but that might end up being more confusing than it's worth. I doubt anybody will be writing constraints against the PVP's version; "I comply with PVP >=1.2.3 && <3.4", said no one ever. Just being able to point to pvp-123 is all that I'm after.

hvr commented 7 years ago

The downside with dates is that it's hard to memorize which versions exist. Using consecutive natural numbers makes them a bit too opaque imho, and it's also harder to remember them IMHO.

So I'd actually propose we go with 2-part version numbers; and we declare the current version to be labeled as "1.0".

We can then have "http://pvp.haskell.org/v1.0" be the permalink to version 1.0, and have http://pvp.haskell.org/ redirect to the latest current version, i.e. pvp.haskell.org/v1.0; once there is say v1.1, we'd make sure that all non-latest versions have a warning at the top denoting this isn't the latest pvp-spec version.

m-renaud commented 6 years ago

Hey, any update on this? I have a libraries proposal that would like to DEPRECATE a function but is blocked by #18 since we don't want to cause a major version bump. Thanks!

sjakobi commented 6 years ago

Bump!

m-renaud commented 5 years ago

Friendly ping on this, this is still blocking #18 which has caused the libraries proposal linked above to be in limbo for almost a year. Let me know what I can do to help move this along :)