all: set Go language version to Go 1.21
Go 1.21 is the oldest currently supported version of Go, see
https://go.dev/doc/devel/release#policy
All supported Go versions (1.21 and 1.22) support
forward compatibility and toolchain management, see
https://go.dev/blog/toolchain
People stuck on much older versions of Go should
stick to older versions of Go Protobuf, too.
fixes golang/protobuf#1613
Change-Id: Id997efd8b47949e82d073c1d26a51d27620f4b82
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/585095
Reviewed-by: Lasse Folger <lassefolger@google.com>
Auto-Submit: Michael Stapelberg <stapelberg@google.com>
Reviewed-by: Cassondra Foesch <cfoesch@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/go.mod b/go.mod
index d0b47c1..7bd7b51 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module google.golang.org/protobuf
-go 1.17
+go 1.21
require (
github.com/golang/protobuf v1.5.0
diff --git a/integration_test.go b/integration_test.go
index 0060904..fddce21 100644
--- a/integration_test.go
+++ b/integration_test.go
@@ -37,13 +37,10 @@
protobufVersion = "27.0-rc1"
golangVersions = func() []string {
- // Version policy: same version as is in the x/ repos' go.mod.
+ // Version policy: oldest supported version of Go.
return []string{
- "1.17.13",
- "1.18.10",
- "1.19.13",
- "1.20.12",
- "1.21.5",
+ "1.21.10",
+ "1.22.3",
}
}()
golangLatest = golangVersions[len(golangVersions)-1]