Skip to content
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

Use correct go directive in go.mod file #5720

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

antoninbas
Copy link
Contributor

The version provided in the go directive must be a valid Go version. go1.21 refers to a development version of Go, not a released version. Prior to 1.21, 1.X was actually the first released version for Go language version 1.X. Starting with 1.21, the first released version is 1.X.0, and the go directive in go.mod should correspond to a valid toolchain version (unless a toolchain directive is also present).

One way to reproduce the issue is to run:
GOTOOLCHAIN="go1.20+auto" go version

When using the go 1.21 directive, the above command will fail as go will try to download toolchain 1.21, which does not exist.

See golang/go#62278 for a detailed discussion.

The version provided in the go directive must be a valid Go
version. go1.21 refers to a development version of Go, not a released
version. Prior to 1.21, 1.X was actually the first released version for
Go language version 1.X. Starting with 1.21, the first released version
is 1.X.0, and the go directive in go.mod should correspond to a valid
toolchain version (unless a toolchain directive is also present).

One way to reproduce the issue is to run:
`GOTOOLCHAIN="go1.20+auto" go version`

When using the `go 1.21` directive, the above command will fail as go
will try to download toolchain 1.21, which does not exist.

See golang/go#62278 for a detailed discussion.

Signed-off-by: Antonin Bas <abas@vmware.com>
@antoninbas
Copy link
Contributor Author

/skip-all

@antoninbas antoninbas merged commit 0ef2e54 into antrea-io:main Nov 17, 2023
50 of 56 checks passed
@antoninbas antoninbas deleted the fix-go-directive-in-go.mod branch November 17, 2023 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants