Skip to content

Commit be77a8a

Browse files
authored
Bump minimum Go version to 1.20 and update Go dependencies (#3159)
### Issues: Addresses * #2856 ### Description of changes: The minimum Go version was pinned at 1.17, which forced `golang.org/x/crypto` to stay at v0.14.0 (the last version supporting Go 1.17). This bumps the minimum to Go 1.20 and updates the Go dependencies to current versions: - `golang.org/x/crypto` v0.14.0 → v0.31.0 - `golang.org/x/sys` v0.13.0 → v0.28.0 - `golang.org/x/term` v0.13.0 → v0.27.0 The minimum version is updated consistently across `go.mod`, `BUILDING.md`, and `cmake/go.cmake`. The Go compatibility CI job is also updated to test against 1.20 instead of 1.17.13. ### Call-outs: Dependabot opened #2856 which bumps `golang.org/x/crypto` to v0.45.0, requiring Go 1.24. This is a more conservative alternative that raises the floor to 1.20 — enough to unpin the `golang.org/x` dependencies without requiring a very recent Go toolchain. ### Testing: Existing CI covers this. The `go.yml` workflow has been updated to test against the new minimum version. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent d50ded5 commit be77a8a

5 files changed

Lines changed: 14 additions & 15 deletions

File tree

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ permissions:
1414
contents: read
1515

1616
jobs:
17-
go-version-1_17_13:
17+
go-version-1_20:
1818
if: github.repository_owner == 'aws'
1919
env:
2020
GOROOT: "/usr/local/go"
21-
GO_ARCHIVE: "go1.17.13.linux-amd64.tar.gz"
21+
GO_ARCHIVE: "go1.20.linux-amd64.tar.gz"
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Install OS Dependencies

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If in doubt, use the most recent stable version of each build tool.
2020
`PERL_EXECUTABLE`.
2121
* To build without Perl (not recommended) see [this section.](#using-pre-generated-build-files)
2222

23-
* [Go](https://golang.org/dl/) 1.17.13 or later is required. If not found by
23+
* [Go](https://golang.org/dl/) 1.20 or later is required. If not found by
2424
CMake, the go executable may be configured explicitly by setting
2525
`GO_EXECUTABLE`.
2626
* To build without Go (not recommended) see [this section.](#using-pre-generated-build-files)

cmake/go.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ elseif(NOT DISABLE_GO)
1414
string(REGEX MATCH "([0-9]+\\.)*[0-9]+" go_version ${go_version_output})
1515

1616
# This should track /go.mod and /BUILDING.md
17-
set(minimum_go_version "1.17.13")
17+
set(minimum_go_version "1.20")
1818
if(go_version VERSION_LESS minimum_go_version)
1919
message(FATAL_ERROR "Go compiler version must be at least ${minimum_go_version}. Found version ${go_version}")
2020
else()

go.mod

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
module github.com/aws/aws-lc
22

33
// When this changes update /cmake/go.cmake minimum_go_version and /BUILDING.md
4-
go 1.17
4+
go 1.20
55

6-
// v0.14.0 was the last version that support 1.17
7-
require golang.org/x/crypto v0.14.0
6+
require golang.org/x/crypto v0.31.0
87

98
require (
10-
golang.org/x/sys v0.13.0 // indirect
11-
golang.org/x/term v0.13.0 // indirect
9+
golang.org/x/sys v0.28.0 // indirect
10+
golang.org/x/term v0.27.0 // indirect
1211
)

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
2-
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
3-
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
4-
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
5-
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
6-
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
1+
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
2+
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
3+
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
4+
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
5+
golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
6+
golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=

0 commit comments

Comments
 (0)