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

Bump gvisor & wireguard to support Go 1.22 #3161

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Bump gvisor & wireguard to support Go 1.22 #3161

merged 1 commit into from
Jan 10, 2024

Conversation

stefanb
Copy link
Contributor

@stefanb stefanb commented Jan 6, 2024

Change Summary

Add support for Go 1.22 by bumping gvisor.dev/gvisor and golang.zx2c4.com/wireguard

What and Why:
When trying to build with Go 1.22rc1 it failed:

$ make build                                 
Running Generate for Help and GraphQL client
go1.22rc1 generate ./...
Running Build
CGO_ENABLED=0 go1.22rc1 build -o bin/flyctl -ldflags="-X 'github.com/superfly/flyctl/internal/buildinfo.buildDate=2024-01-06T22:18:05Z' -X 'github.com/superfly/flyctl/internal/buildinfo.branchName=master'" .
# gvisor.dev/gvisor/pkg/sync
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/gate_unsafe.go:114:3: undefined: goready
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/gate_unsafe.go:144:2: undefined: gopark
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/rwmutex_unsafe.go:76:3: undefined: semacquire
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/rwmutex_unsafe.go:102:4: undefined: semrelease
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/rwmutex_unsafe.go:152:3: undefined: semacquire
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/rwmutex_unsafe.go:179:3: undefined: semrelease
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/rwmutex_unsafe.go:207:3: undefined: semrelease
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/seqcount.go:87:6: undefined: canSpin
../../../go/pkg/mod/gvisor.dev/[email protected]/pkg/sync/seqcount.go:89:4: undefined: doSpin
make: *** [build] Error 1

Go 1.22 support was added to gvisor.dev/gvisor in:

How:

Because gvisor.dev/gvisor API changed slightly and is referenced via golang.zx2c4.com/wireguard I ran:

go get golang.zx2c4.com/wireguard@latest
go mod tidy

The build then succeeded:

$ make build
Running Generate for Help and GraphQL client
go1.22rc1 generate ./...
Running Build
CGO_ENABLED=0 go1.22rc1 build -o bin/flyctl -ldflags="-X 'github.com/superfly/flyctl/internal/buildinfo.buildDate=2024-01-06T22:24:52Z' -X 'github.com/superfly/flyctl/internal/buildinfo.branchName=go1.22'" .

Related to:


Documentation

  • Fresh Produce
  • In superfly/docs, or asked for help from docs team
  • n/a

ran:
go get golang.zx2c4.com/wireguard@latest
to get also the updated gvisor.dev/gvisor with Go 1.22 support from google/gvisor#9197

Fixes #3145
@stefanb stefanb changed the title Support Go 1.22 Bump gvisor & wireguard to support Go 1.22 Jan 7, 2024
@stefanb stefanb mentioned this pull request Jan 7, 2024
@dangra dangra merged commit 95f615f into superfly:master Jan 10, 2024
10 of 11 checks passed
@dangra
Copy link
Member

dangra commented Jan 10, 2024

thanks @stefanb !

@stefanb stefanb deleted the go1.22 branch January 10, 2024 17:04
@stefanb
Copy link
Contributor Author

stefanb commented Jan 10, 2024

@dangra you're welcome!
Please don't forget to tag & release a version once everything else is ready.

@dangra
Copy link
Member

dangra commented Jan 11, 2024

Good call and sorry for the delay. v0.1.140 is on its way to be a new release.

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.

Support Go 1.22
2 participants