haxelib
haxelib copied to clipboard
Use SemVer where sensible
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 installshould install the latest stable version (if there is a stable version).- [ ]
haxelib updateshould 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 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.
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.
I'll leave it unticked until it works and is tested then. Thanks :)
If we use semver, I think we should simply remove the notion of "current"
(including in the haxelib db/source code) so we make sure that all the cases are treated accordingly
Is there anything left to do here?