-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: pin go directive to 1.23.0 #86
base: master
Are you sure you want to change the base?
Conversation
- relax go directive to 1.23.0 to match the N-1 and N support statement and permit run/build with go1.23.0 and newer (Go treats this as mandatory) - use the toolchain directive to recommend the latest 1.23.x (Go treats this as advisory) Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
We've had mixed results using the Note that this is a fork of the |
Not sure what you mean by mixed results? From a CI perspective, in your reusable GitHub workflows you're asking setup-go to use "stable" (N) and (optionally) "oldstable" (N-1) which currently would be the latest Go 1.23.x and Go 1.24.x releases known by actions/setup-go. After installing those Go will look at the Local developers using the default GOTOOLCHAIN=auto will have the same behaviour of newer toolchains being silently fetched as needed. If a local developer has set GOTOOLCHAIN=local then it just needs to be some version of Go 1.23.x to allow compilation to succeed |
That seems like an anti-feature to me, as does the entire |
You could say mixed results literally, as well as figuratively, i.e. which Go version is used where exactly, and to what extent things broke 😅
I'm aware of |
@marten-seemann I don't disagree, I also think it was an anti-feature when they changed the In Go 1.22 then even made it so you couldn't use go 1.22 in go.mod and were required to include a minor version as go 1.22.0. Then they changed their mind again in go 1.23 in this comment on this well-cited GH issue on the confusion around the go directive changes: However, that's really saying that Unfortunately from a GitHub Actions perspective, setup-go doesn't currently know or use go toolchain versions, it's just manually parsing the go.mod for 'go' directives itself and hasn't really kept up with the 1.22 and 1.23 changes here. There's an issue tracking that over here |
As mentioned above though, your workflow is currently just setting "stable" and "oldstable" aliases in actions/setup-go anyway, so you're already getting silently rather than explicitly bumped regardless of any |
Ok, so here's my understanding (I haven't researched this in depth, so this might be wrong): If I put If I put Isn't that exactly what we want? |
Unfortunately -go 1.23
+go 1.23.0
+
+toolchain go1.23.6 |
But yes, if you're willing to accept the As-in:
|
What's the meaning of this? Any Go 1.23.x version? |
Yes, it means "language version 1.23.0 and toolchain version 1.23.0" So you'd get behaviour like this:
Also note that in all cases above if you have |
Looks like we're not only ones unhappy with the |
PR #85 bumped the Go directive to 1.23.6 rather than 1.23.0, which requires corresponding Go directive bumps in all consumers. Instead use both a go and toolchain directive as follows: