-
Notifications
You must be signed in to change notification settings - Fork 527
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
Update default value for GOTOOLCHAIN env variable #420
Comments
Hello @gaby , thank you for your input. We start to investigate the problem. |
@dsame Thanks! I don't expect the Go team to change this default value. |
Also related: golang/go#62409 |
Hello @gaby, Despite the specifying GOTOOLCHAIN is as easy as any other environment variables i still do not understand the problem well, namely why this can be happen:
according the documentation of Go the newer toolchain will be used in this case. I.e. go.mod version will be ignored see " the new toolchain would be used automatically" Can you please provide the sample where the build filed because of And does it help to set GOTOOLCHAIN to the desired value for the workflow manually? So far my understanding is the default value "auto" works best in the most cases. |
@dsame Yes, it happens here https://github.com/gofiber/contrib/actions/runs/6047961443/job/16412414494 The CI file is located here: https://github.com/gofiber/contrib/blob/main/.github/workflows/govulncheck.yml The go.mod file for the failure is here: https://github.com/gofiber/contrib/blob/main/paseto/go.mod |
@dsame Closing this, the issue was caused by a dependency requiring go 1.21 The explanation can be found here golang/go#62409 (comment) Thanks for your help! |
With the release of
go1.21
the behavior for running changed, by default go will now useGOTOOLCHAIN=auto
which will fail to run your code unless you dogo mod tidy
if the go version specified ingo.mod
is older than the one insetup-go
.One fix for this is to set
GOTOOLCHAIN=local
, so that go doesn't try to force update your toolchain. Add support for specifying theGOTOOLCHAIN
, or set it toGOTOOLCHAIN=local
by default.Docs:
The text was updated successfully, but these errors were encountered: