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

Finalize support of Go 1.22 #6078

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'

- name: Prepare environment
run: |
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand All @@ -129,7 +129,7 @@ jobs:
run: |
source env.sh
unset CI # workaround for "PackageAndroid" target
sudo -E go run mage.go -v ${{ matrix.platform }}
go run mage.go -v ${{ matrix.platform }}

build-swagger:
runs-on: ubuntu-latest
Expand All @@ -144,7 +144,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'
- uses: actions/download-artifact@v4
with:
name: env.sh
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests-and-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'

- name: Install protoc
run: |
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -75,7 +75,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21.x'
go-version: '1.22.x'

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down
2 changes: 1 addition & 1 deletion bin/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
alias myst-home="cd $GOPATH/src/github.com/mysteriumnetwork/node"
alias myst="myst-home"

alias myst-broker="myst-home && docker-compose up broker"
alias myst-broker="myst-home && docker compose up broker"
alias myst-nats="myst-broker"

alias myst-consumer="myst-home && bin/build && bin/run_consumer"
Expand Down
2 changes: 1 addition & 1 deletion bin/build_xgo
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ DIR_BUILD="build/myst"
mkdir -p ${DIR_BUILD}
DIR_TEMP=`mktemp -d ${DIR_BUILD}/${tempname}.XXXXXX`

IMAGE="mysteriumnetwork/xgo:1.20.2"
IMAGE="mysteriumnetwork/xgo:1.22.2"

docker run --rm \
-v "$PWD"/$DIR_TEMP:/build \
Expand Down
2 changes: 1 addition & 1 deletion bin/builder_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20 AS builder
FROM golang:1.22 AS builder

# Install FPM
RUN apt-get update \
Expand Down
2 changes: 1 addition & 1 deletion bin/docker/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.20-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder

# Install packages
RUN apk add --no-cache git bash gcc musl-dev make linux-headers
Expand Down
2 changes: 1 addition & 1 deletion bin/package_android
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker run --rm \
-e EXT_GOPATH=/ext-go/1 \
-e GO111MODULE=on \
-e GOFLAGS=-mod=mod \
mysteriumnetwork/xgomobile:1.20.2 ./mobile/mysterium
mysteriumnetwork/xgomobile:1.22.2 ./mobile/mysterium

if [[ -f $OUT_FILENAME_AAR ]]; then
print_success "Android package ${OUT_FILENAME_AAR} build complete!"
Expand Down
2 changes: 1 addition & 1 deletion bin/package_android_provider
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docker run --rm \
-e EXT_GOPATH=/ext-go/1 \
-e GO111MODULE=on \
-e GOFLAGS=-mod=mod \
mysteriumnetwork/xgomobile:1.20.2 ./mobile/mysterium
mysteriumnetwork/xgomobile:1.22.2 ./mobile/mysterium

if [[ -f $OUT_FILENAME_AAR ]]; then
print_success "Android package ${OUT_FILENAME_AAR} build complete!"
Expand Down
2 changes: 1 addition & 1 deletion bin/release_ppa
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ echo "myst ($VERSION+build$BUILD+$DISTR) $DISTR; urgency=medium
echo '#!/usr/bin/make -f

export DH_VERBOSE := 1
export PATH := /usr/lib/go-1.20/bin/:$(PATH)
export PATH := /usr/lib/go-1.22/bin/:$(PATH)
export GOPATH := $(CURDIR)/go
export BUILD_COMMIT := '$BUILD_COMMIT'
export BUILD_BRANCH := '$BUILD_BRANCH'
Expand Down
3 changes: 2 additions & 1 deletion ci/packages/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ func PackageDockerSwaggerRedoc() error {
}

func goGet(pkg string) error {
return sh.RunWith(map[string]string{"GO111MODULE": "off"}, "go", "get", "-u", pkg)
// don't use GO111MODULE=off with Go 1.22, as it's not supported
return sh.Run("go", "get", "-u", pkg)
}

func packageStandalone(binaryPath, os, arch string, extraEnvs map[string]string) error {
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Maintainer: Mysterium Team <[email protected]>
Build-Depends:
dh-golang,
debhelper (>= 8.0.0),
golang-1.20,
golang-1.22,
Standards-Version: 3.9.7
Homepage: https://mysterium.network
Vcs-Git: git://github.com/mysteriumnetwork/node.git
Expand Down
2 changes: 1 addition & 1 deletion e2e/gorunner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM golang:1.20-alpine
FROM golang:1.22-alpine

RUN apk add --no-cache bash gcc musl-dev make linux-headers iptables ipset ca-certificates openvpn bash sudo openresolv
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/mysteriumnetwork/node

go 1.19
go 1.22.0

toolchain go1.22.2

require (
github.com/BurntSushi/toml v1.3.2
Expand Down Expand Up @@ -66,12 +68,12 @@ require (
golang.org/x/net v0.24.0
golang.org/x/oauth2 v0.13.0
golang.org/x/sys v0.19.0
golang.org/x/time v0.4.0
golang.org/x/time v0.5.0
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211230205640-daad0b7ba671
golang.zx2c4.com/wireguard/windows v0.5.3
google.golang.org/protobuf v1.31.0
gvisor.dev/gvisor v0.0.0-20230927004350-cbd86285d259
google.golang.org/protobuf v1.32.0
gvisor.dev/gvisor v0.0.0-20240420021641-b12088a5ac74 // release-20240422.0 @go branch
)

require (
Expand Down Expand Up @@ -140,7 +142,7 @@ require (
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gopacket v1.1.19 // indirect
Expand Down Expand Up @@ -254,10 +256,11 @@ require (
golang.org/x/arch v0.5.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.15.0 // indirect
golang.org/x/tools v0.16.1 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
google.golang.org/appengine v1.6.8 // indirect
gopkg.in/intercom/intercom-go.v2 v2.0.0-20210504094731-2bd1af0ce4b2 // indirect
Expand All @@ -268,7 +271,4 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace (
golang.zx2c4.com/wireguard => github.com/mysteriumnetwork/wireguard-go v0.0.0-20240416113031-406b13e8996a
//gvisor.dev/gvisor => github.com/mysteriumnetwork/gvisor v0.0.0-20240206094932-ff91e662b9e8
)
replace golang.zx2c4.com/wireguard => github.com/mysteriumnetwork/wireguard-go v0.0.0-20240416113031-406b13e8996a
Loading