Remix.run Logo
october8140 4 hours ago

1.0.0.0.0.0.0.0

qrobit 3 hours ago | parent | next [-]

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 13 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.

Y-bar a minute ago | parent [-]

You put into words why I appreciate SemVer so much! It is so much better at being deterministic and therefore allows me a greater confidence in version control.

The author of a library has no idea how tightly coupled my code is to theirs and should therefore only make yes/no answers to ”is this a breaking” change.

For example, when a large ORM library si use changed a small thing like ”no longer expose db tables for certain queries because not all db engines support it anyway” (ie moving a protected property to private) it required a two week effort to restructure the code base.

> In practice, with Semver, changes like this get reflected in the package name instead of the version number.

Not once have I seen this happen. Any specific examples?

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.

3 hours ago | parent | prev [-]
[deleted]