-
Notifications
You must be signed in to change notification settings - Fork 954
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 to go1.22 #981
update to go1.22 #981
Conversation
Since the first minor version update has already been released, we can probably feel comfortable updating to go1.21. This version now enforces that the go version on the system is compatible with the version specified in go.mod, so we can remove the old logic around checking the minimum version in the Makefile. - https://go.dev/doc/go1.21#tools > To improve forwards compatibility, Go 1.21 now reads the go line in a go.work or go.mod file as a strict minimum requirement: go 1.21.0 means that the workspace or module cannot be used with Go 1.20 or with Go 1.21rc1. This allows projects that depend on fixes made in later versions of Go to ensure that they are not used with earlier versions. It also gives better error reporting for projects that make use of new Go features: when the problem is that a newer Go version is needed, that problem is reported clearly, instead of attempting to build the code and printing errors about unresolved imports or syntax errors.
https://tip.golang.org/doc/go1.21#windows
I think the only tricky thing about this is whether we want to drop support for older versions of Windows. |
Let’s move this to Nebula 1.9 at least |
one more change except go 1.22 google/gvisor@64268c8 EDIT: attempting to patch to build on Alpinelinux https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/61981 |
@andypost why do you need to patch out CGO_ENABLED ? Nebula shouldn't require CGO for standard builds. EDIT: ah I see, they use You should also be able to do
|
Updated to point to go1.22 |
Need to use the latest commit on the `go` branch, see: - https://github.com/google/gvisor?tab=readme-ov-file#using-go-get
Is this why it is failing?
Since the first minor version update has already been released, we can probably feel comfortable updating to go1.21. This version now enforces that the go version on the system is compatible with the version specified in go.mod, so we can remove the old logic around checking the minimum version in the Makefile.
Also, switch off of
go-version-file
in the Github Actions, because it doesn't work great with the newgo mod tidy
format that go 1.22 does. See:We have to make a few fixes for gvisor for go1.22 compatibility, I merged in the fixes from #1093 to resolve those.