haxelib icon indicating copy to clipboard operation
haxelib copied to clipboard

Use SemVer where sensible

Open back2dos opened this issue 10 years ago • 6 comments

In #142 @jasononeil made a couple of propositions regarding this:

  • [ ] The website lists would be sorted by semver, not upload time.
  • [x] The current version would be based on semver, not upload time, meaning:
    • [ ] You could upload a bug fix for a "2." version, when "3." is already uploaded, and "3.*" will remain current.
    • [x] If there is a "stable" version (Version > 1.0, and not tagged alpha/beta/rc) then this should take precedence over a non-stable version.
  • [x] haxelib install should install the latest stable version (if there is a stable version).
  • [ ] haxelib update should only update to the same level of release. (If you have a stable release, only update to a stable release. If you have a beta though update to a beta).
  • [ ] Perhaps we can have a haxelib install project [alpha|beta|rc] style commands.

In short, if we actually draw some meaning from our semantic versioning, I think we have an adequate solution to this problem.

Regarding the update rule, @ncannasse voiced concerns. I share them in so far as that if as a community we don't embrace SemVer, then relying on it will do more harm than good. Another solution would be of course to commit to it, but that pretty much hinges on the compiler team also taking that step.

The specific comment:

I agree for everything apart from haxelib update sticking to the same level of release. I think this will cause much more issues that it fixes. Maybe we could instead have an extra optional parameter such as "haxelib update mylib 3.2" that would update to the latest 3.2.x

back2dos avatar Mar 10 '15 11:03 back2dos

@back2dos am I right that the update you did for #142 means I can tick off the boxes above?

If it is then I think we could get the remaining boxes ticked for the 3.2 milestone.

jasononeil avatar Mar 14 '15 05:03 jasononeil

Partially. I don't think "You could upload a bug fix for a "2." version, when "3." is already uploaded, and "3.*" will remain current." is handled by that. The last two shouldn't be very hard. The getLatest function accepts a prerelease filter that should make this relatively straight forward.

back2dos avatar Mar 14 '15 08:03 back2dos

I'll leave it unticked until it works and is tested then. Thanks :)

jasononeil avatar Mar 14 '15 08:03 jasononeil

If we use semver, I think we should simply remove the notion of "current"

ncannasse avatar Mar 14 '15 12:03 ncannasse

(including in the haxelib db/source code) so we make sure that all the cases are treated accordingly

ncannasse avatar Mar 14 '15 12:03 ncannasse

Is there anything left to do here?

nadako avatar Dec 22 '15 22:12 nadako