mojombo/semver — Issue #6: Guidance for versionning of pre
Author: serialseb
Created: 2011-12-12 17:45:06+00:00
State: open

It is often the case that packages contain breaking changes between, say, a beta 1 and beta 2 build. In the wild, a lot of packages seem to want to achieve their release with a clean "2.0.0" version. As API incompatibilities usually happen between those phases, my understanding of the specification is that the version number should be bumped, which means that you couldn't make breaking changes between beta1 and beta2 without bumping the major version.

So in the wild I've seen people use the pre to version their pre-release, aka `1.0.0-public.beta.1 < 1.0.0-public.beta.2`. This introduces issues when releasing packages in-between the two, as there is no version number change the dependency on one version or the other cannot be taken from the package manager.

Another issue is that there may be interemdiary builds between beta 1 and beta 2, and it's unclear how one would go about doing this while preserving the correct order of packages. One could try `1.0.0-ci.25` but that would put any ci build as before any of the beta packages, so it seems to me not bumping the version really causes issues there too.

As far as implementing a package manager that can take dependencies, the specification defines what packages match a dependency (aka 1.0.0+build and 1.0.0-alpha both match a 1.0.0 specification) but does not discuss (allowing or disallowing) how dependency on specific builds or pre versions ought to function, if at all.

In other words, the use of pre tags seems to me to be missing guidance on the following points:

- when should version be bumped between two pre packages
- explicitly state that the order is forward only and it is expected that any future build sharing a version number can only have alpha builds, then beta builds, etc
- discussing how package managers ought to implement dependency declarations (only on version, on version+build, on version-alpha+build?), which i'd suggest should be forbidden on builds and optional on pre (so one could take a dependency on beta.1 instead of just on the version, provided you don't make bumping version numbers mandatory between pre builds)