From 3cc1498c3cf6edd4f1d11b000e678671384936a2 Mon Sep 17 00:00:00 2001 From: Brandur Leach Date: Sun, 18 Aug 2024 16:04:02 -0700 Subject: [PATCH] Add Go 1.23 to build matrix + update toolchain (#533) Add Go 1.23 to the build matrix and update toolchain in `go.work` and all `go.mod` files. Add development instructions for how to use the new `make update-mod-go` to do so in an automated way. I didn't drop Go 1.21 support yet because I figure there isn't a hurry in jettisoning it immediately, although, we'll have to see how the build stability is with the expanded matrix. --- .github/workflows/ci.yaml | 1 + cmd/river/go.mod | 2 +- docs/development.md | 8 ++++++++ go.mod | 2 +- go.work | 2 +- riverdriver/go.mod | 2 +- riverdriver/riverdatabasesql/go.mod | 2 +- riverdriver/riverpgxv5/go.mod | 2 +- rivershared/go.mod | 2 +- rivertype/go.mod | 2 +- 10 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a0b01e8e..9119a420 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,6 +30,7 @@ jobs: go-version: - "1.21" - "1.22" + - "1.23" postgres-version: [14, 15, 16] fail-fast: false timeout-minutes: 5 diff --git a/cmd/river/go.mod b/cmd/river/go.mod index a5edcad9..161c9f29 100644 --- a/cmd/river/go.mod +++ b/cmd/river/go.mod @@ -2,7 +2,7 @@ module github.com/riverqueue/river/cmd/river go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 require ( github.com/jackc/pgx/v5 v5.6.0 diff --git a/docs/development.md b/docs/development.md index aecf1de8..34bc61f4 100644 --- a/docs/development.md +++ b/docs/development.md @@ -104,3 +104,11 @@ If updates to River dependencies _are_ required, then a second phase of the rele ``` The main `$VERSION` tag and `cmd/river/$VERSION` will point to different commits, and although a little odd, is tolerable. + +### Updating Go or toolchain versions in all `go.mod` files + +Modify `go.work` so it contains the new desired version in `go` and/or `toolchain` directives, then run `make update-mod-go` to have it reflect the new version(s) into all the workspace's `go.mod` files: + +```shell +make update-mod-go +``` \ No newline at end of file diff --git a/go.mod b/go.mod index 826d19c1..d13eb7aa 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/riverqueue/river go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 require ( github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa diff --git a/go.work b/go.work index ae23fdc4..d29ad954 100644 --- a/go.work +++ b/go.work @@ -1,6 +1,6 @@ go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 use ( . diff --git a/riverdriver/go.mod b/riverdriver/go.mod index ed56a0f8..dbc221f0 100644 --- a/riverdriver/go.mod +++ b/riverdriver/go.mod @@ -2,6 +2,6 @@ module github.com/riverqueue/river/riverdriver go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 require github.com/riverqueue/river/rivertype v0.11.2 diff --git a/riverdriver/riverdatabasesql/go.mod b/riverdriver/riverdatabasesql/go.mod index dafe8090..9430fbcd 100644 --- a/riverdriver/riverdatabasesql/go.mod +++ b/riverdriver/riverdatabasesql/go.mod @@ -2,7 +2,7 @@ module github.com/riverqueue/river/riverdriver/riverdatabasesql go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 require ( github.com/lib/pq v1.10.9 diff --git a/riverdriver/riverpgxv5/go.mod b/riverdriver/riverpgxv5/go.mod index 578711b8..6cc33b38 100644 --- a/riverdriver/riverpgxv5/go.mod +++ b/riverdriver/riverpgxv5/go.mod @@ -2,7 +2,7 @@ module github.com/riverqueue/river/riverdriver/riverpgxv5 go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 require ( github.com/jackc/pgx/v5 v5.5.0 diff --git a/rivershared/go.mod b/rivershared/go.mod index 86d93d0a..220b2561 100644 --- a/rivershared/go.mod +++ b/rivershared/go.mod @@ -2,7 +2,7 @@ module github.com/riverqueue/river/rivershared go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 require ( github.com/stretchr/testify v1.9.0 diff --git a/rivertype/go.mod b/rivertype/go.mod index fc474293..9ae0bb84 100644 --- a/rivertype/go.mod +++ b/rivertype/go.mod @@ -2,7 +2,7 @@ module github.com/riverqueue/river/rivertype go 1.21 -toolchain go1.22.5 +toolchain go1.23.0 require github.com/stretchr/testify v1.9.0