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

chore: upgrade to go1.21.9 #1548

Merged
merged 7 commits into from
Apr 26, 2024
Merged
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
24 changes: 0 additions & 24 deletions .github/workflows/go1.21.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Dockerfile.oonith
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Note: The Dockerfile needs to reside in the root of the repo, so that we can
# copy files into the docker build context.
FROM golang:1.20.14-bullseye as builder
FROM golang:1.21.9-bullseye as builder
ARG BRANCH_NAME=master

WORKDIR /build
Expand All @@ -13,7 +13,7 @@ COPY . .
RUN go run ./internal/cmd/buildtool oohelperd build

## Image running on the host
FROM golang:1.20.14-bullseye as runner
FROM golang:1.21.9-bullseye as runner

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion GOVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.14
1.21.9
9 changes: 5 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ builds use the latest commit of the `master` branch.
To setup development for this repository you need Go >= 1.15. The
`./script/go.bash` script will automatically download the expected
version of Go mentioned in the [GOVERSION](GOVERSION) file (i.e.,
go1.20.14) and use it for building.
go1.21.9) and use it for building.

You can also bypass `./script/go.bash` and build ooniprobe manually using
`go build ...` but, in such a case, note that:
Expand Down Expand Up @@ -146,9 +146,10 @@ using the correct version of Go. Running this script as follows:
Is equivalent to running these commands:

```bash
go install -v golang.org/dl/go1.20.14@latest
$HOME/go/bin/go1.20.14 download
$HOME/sdk/go1.20.14/bin/go build -v -ldflags '-s -w' ./internal/cmd/miniooni
go install -v golang.org/dl/go1.21.9@latest
$HOME/go/bin/go1.21.9 download
export GOTOOLCHAIN=local
$HOME/sdk/go1.21.9/bin/go build -v -ldflags '-s -w' ./internal/cmd/miniooni
```

### Common build targets
Expand Down
7 changes: 6 additions & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ Probe SHOULD build for any version greater than this version. We indicate the ex
Go version inside the `GOVERSION` file. We try to use a stable, still supported Go
version that is compatible with our dependencies.

After updating `GOVERSION`, we need to update our stdlib forks:
We should additionally update the `toolchain` line inside of `go.mod` to use the
specific toolchain we want to use. (The `toolchain` mechanism was introduced by
Go 1.21.0 and it may be that we can now use just the `toolchain` instead of
using the `GOVERSIOn` file; this should eventually be investigated.)

After updating `GOVERSION` and `go.mod`, we need to update our stdlib forks:

- https://github.com/ooni/oocrypto
- https://github.com/ooni/oohttp
Expand Down
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
module github.com/ooni/probe-cli/v3

go 1.20
go 1.21

toolchain go1.21.9

require (
filippo.io/age v1.1.1
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Psiphon-Labs/psiphon-tunnel-core v1.0.11-0.20240312131609-91e2a902d867
github.com/Psiphon-Labs/psiphon-tunnel-core v1.0.11-0.20240424194431-3612a5a6fb4c
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/apex/log v1.9.0
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
Expand All @@ -25,8 +27,8 @@ require (
github.com/mitchellh/go-wordwrap v1.0.1
github.com/montanaflynn/stats v0.7.1
github.com/ooni/netem v0.0.0-20240208095707-608dcbcd82b8
github.com/ooni/oocrypto v0.5.8
github.com/ooni/oohttp v0.6.8
github.com/ooni/oocrypto v0.6.0
github.com/ooni/oohttp v0.7.1
github.com/ooni/probe-assets v0.22.0
github.com/pborman/getopt/v2 v2.1.0
github.com/pion/stun v0.6.1
Expand All @@ -40,20 +42,18 @@ require (
gitlab.com/yawning/utls.git v0.0.12-1
gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib v1.5.0
gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/v2 v2.6.1
golang.org/x/crypto v0.21.0
golang.org/x/net v0.23.0
golang.org/x/sys v0.18.0
golang.org/x/crypto v0.22.0
golang.org/x/net v0.24.0
golang.org/x/sys v0.19.0
)

require (
filippo.io/bigmod v0.0.3 // indirect
filippo.io/keygen v0.0.0-20230306160926-5201437acf8e // indirect
github.com/Psiphon-Labs/bolt v0.0.0-20200624191537-23cedaef7ad7 // indirect
github.com/Psiphon-Labs/goptlib v0.0.0-20200406165125-c0e32a7a3464 // indirect
github.com/Psiphon-Labs/qtls-go1-19 v0.0.0-20230608213623-d58aa73e519a // indirect
github.com/Psiphon-Labs/qtls-go1-20 v0.0.0-20230608214729-dd57d6787acf // indirect
github.com/Psiphon-Labs/quic-go v0.0.0-20230626192210-73f29effc9da // indirect
github.com/Psiphon-Labs/tls-tris v0.0.0-20230824155421-58bf6d336a9a // indirect
github.com/Psiphon-Labs/psiphon-tls v0.0.0-20240424193802-52b2602ec60c // indirect
github.com/Psiphon-Labs/quic-go v0.0.0-20240424181006-45545f5e1536 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect
Expand All @@ -74,7 +74,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/qpack v0.4.0 // indirect
github.com/quic-go/qtls-go1-20 v0.4.1 // indirect
github.com/refraction-networking/conjure v0.7.10 // indirect
github.com/refraction-networking/conjure v0.7.11-0.20240130155008-c8df96195ab2 // indirect
github.com/refraction-networking/ed25519 v0.1.2 // indirect
github.com/refraction-networking/obfs4 v0.1.2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
Expand Down Expand Up @@ -153,7 +153,7 @@ require (
github.com/xtaci/smux v1.5.24 // indirect
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.17.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
Expand Down
Loading
Loading