Remix.run Logo
qrobit 3 hours ago

Hackage recommends using Haskell's PVP[^1], but does not enforce it. That's why many haskell packages are a four-places versions: 3 required and fourth optional (but popular) that represents "other" changes, like documentation.

[^1]: https://pvp.haskell.org/

whateveracct 2 hours ago | parent | next [-]

Also, iirc PVP pre-dates SemVer. For anyone going to accuse Haskell of NIH :)

Remember, everyone: Haskell is very old!

Y-bar 3 hours ago | parent | prev | next [-]

> A.B is known as the major version number

Why are they requiring two numbers to represent one (semantic) number?

tikhonj 10 minutes ago | parent | next [-]

I rather like this. A represents major changes like a substantial redesign of the whole API, while B catches all other breaking changes. Tiny changes to the public API of a library may not be strictly backwards compatible, even if they don't affect most users of the package or require substantial work to address.

A problem with Semver is that a jump from 101.1.2 to 102.0.0 might be a trivial upgrade, and then the jump to 103.0.0 requires rewriting half your code. With two major version numbers, that would be 1.101.1.2 to 1.102.0.0 to 2.0.0.0. That makes the difference immediately clear, and lets library authors push a 1.103.0.0 release if they really need to.

In practice, with Semver, changes like this get reflected in the package name instead of the version number. (Like maybe you go from data-frames 101.1.2 to data-frames-2 1.0.0.) But there's no consistent convention for how this works, and it always felt awkward to me, especially if the intention is that everyone migrates to the new version of the API eventually.

winwang 2 hours ago | parent | prev [-]

(no idea but) I feel like changing the first number has a psychological issue, but the 2nd number feels more important than just "minor" sometimes. So may as well let the schema set the mind free?

philipwhiuk 2 hours ago | parent | prev [-]

> MAY optionally have *any* number of additional components, for example 2.1.0.4

Thus making the silly example possible.