-
Notifications
You must be signed in to change notification settings - Fork 91
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
fix: semantic versioning does not care about -dev so lets use -alpha #300
Conversation
The go-version lib doesn't implement strict semver, specially the constraint logic since according to them is not specified on the spec. You can check in details here: hashicorp/go-version#35 (comment) "This lib doesn't strictly follow semver so it wouldn't be unprecedented to merge, just curious" a version that is I suppose this is also the terramate behavior, since it is a hashi lib. Overall me and @i4ki were kind puzzled by this, they say that the spec doesn't say anything about constraints, but the spec is very clear about ordering, so when I declare a constraint I suppose it will be applied on the ordering defined on the spec, but it doesn't in the end x_x ps. bonus round with more puzzled people: hashicorp/go-version#59 |
@katcipis whats your take on fixing this then? terraform uses |
Terraform itself uses -dev: https://github.com/hashicorp/terraform/blob/8040dfec3467d9dca7561d944ff9642bd0699ff0/version/version.go#L19 Didn't find anything on the go-version lib that handles alpha specially, if that works on terraform it would be some extra logic on terraform itself 🤔 ...or maybe I missed something. @i4ki and dug throught eh go-version lib, WDYT ? |
I didn't find any special handling in the terraform version check code as well. |
Some local testing that @i4ki did:
Just to confirm, this is the scenario that is supposed to work by using -alpha instead of -dev ? I doesn't seem like it is going to work 🤔 |
fixes https://github.com/mineiros-io/terramate-example-code-generation/runs/5979406505?check_suite_focus=true#step:7:7