Fix go directive version in go.mod#5636
Conversation
According to https://go.dev/issues/62278 a concrete go version has to include the patch number. The project declares the version as 1.21 which is invalid and will result in an error: GOTOOLCHAIN="go1.20+auto" go1.21.5 mod tidy go: downloading go1.21 (linux/amd64) go: download go1.21 for linux/amd64: toolchain not available Changed to 1.21.0 as this is the first actual release of go 1.21. Signed-off-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
|
Thanks for bringing this into our attention, this currently fails the building on Go 1.20 which we allow compiling for at the moment but would remove soon: One question, this would not mean that we are forcing the Go toolchain to be v1.21.0 correct? |
AFAIK we only support Go versions N and N-1, so that would be Go 1.22 and Go 1.21? |
|
What is the status of this PR? |
Sorry for the delay in replying. No, this simply means that you need Go >= 1.21.0 to build. The 1.21.0 is just a placeholder; 1.21 is not a valid toolchain version. The first valid Go version for any release is vx.xx.0. You are correct that we would be dropping Go 1.20 with this change. In order to pin a specific toolchain version you have to use the go directive plus the toolchain directive. |
I guess the main issue here is dropping support for Go 1.20, which is not maintained anymore since the release of 1.22 back in February. |
|
@wallyqs should we merge this? |
|
Needs another PR first to remove Go 1.20 otherwise build won't be green, will send PR |
According to https://go.dev/issues/62278 a concrete go version has to include
the patch number. The project declares the version as 1.21 which is invalid and
will result in an error:
Changed to 1.21.0 as this is the first actual release of go 1.21.