-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Masterminds/semver with blang/semver #22
Comments
I've had a look at this and I'm not sure that it would be an improvement https://play.golang.org/p/2ofl4YOXwdn I don't think |
Me neither. The spec doesn't talk about ranges or wildcards, but the path of least surprise would surely be to ignore prereleases unless allowed in the pattern; and in particular to ignore them given a wildcard. Masterminds/semver/v3 has that behaviour for ranges: https://play.golang.org/p/U-v_bYmAiHQ. It also (now?) has a strict parsing mode that will error if the supplied string doesn't conform to the spec https://pkg.go.dev/github.com/Masterminds/semver/v3?tab=doc#StrictNewVersion (NB a leading |
I agree, but one thing in favour of this change, is that it would be consistent with the https://github.com/fluxcd/source-controller Probably better to be consistently doing the same (arguably wrong) thing? It feels like there needs to be consensus on the desired behaviour, and whatever changes applied to get something consistent across the tooling? |
I posted fluxcd/source-controller#127 about including prereleases in ranges -- this is seriously broken behaviour. |
Hi @bigkevmcd - great to see you here. :-) |
Superseded by #38 . |
The Masterminds semver is seriously flawed see fluxcd/flux#2729
In source controller we decided to use blang/semver for Git tags semver ranges.
The text was updated successfully, but these errors were encountered: