Skip to content

Commit

Permalink
Use Go 1.21
Browse files Browse the repository at this point in the history
This updates go.mod files to use Go 1.21.

It also updates the CI to use Go 1.20 and 1.21 to test.

Note that this specifies the minimum version required to work with
Fx to be Go 1.20 as specified in the toolchain specification
(https://go.dev/doc/toolchain).
  • Loading branch information
sywhang committed Aug 15, 2023
1 parent 46bea37 commit b8ea551
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
go: ["1.19.x", "1.20.x"]
go: ["1.20.x", "1.21.x"]
include:
- go: 1.20.x
- go: 1.21.x
os: "ubuntu-latest"
latest: true

Expand Down
2 changes: 1 addition & 1 deletion docs/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.uber.org/fx/docs

go 1.19
go 1.20

require (
github.com/stretchr/testify v1.8.0
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.uber.org/fx

go 1.19
go 1.20

require (
github.com/benbjohnson/clock v1.3.0
Expand Down
4 changes: 3 additions & 1 deletion internal/e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module go.uber.org/fx/internal/e2e

go 1.20
go 1.21

toolchain go1.21.0

require (
github.com/stretchr/testify v1.8.2
Expand Down
3 changes: 3 additions & 0 deletions internal/e2e/go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand All @@ -18,6 +20,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/dig v1.17.0 h1:5Chju+tUvcC+N7N6EV08BJz41UZuO3BmHcN4A287ZLI=
go.uber.org/dig v1.17.0/go.mod h1:rTxpf7l5I0eBTlE6/9RL+lDybC7WFwY2QH55ZSjy1mU=
go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY=
Expand Down
2 changes: 1 addition & 1 deletion internal/fxreflect/stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestStack(t *testing.T) {
}()

require.True(t, len(frames) > 3, "expected at least three frames")
for i, name := range []string{"func2.1.1", "func2.1", "func2"} {
for i, name := range []string{"func2.TestStack.func2.1.func2", "func2.1", "func2"} {
f := frames[i]
assert.Equal(t, "go.uber.org/fx/internal/fxreflect.TestStack."+name, f.Function)
assert.Contains(t, f.File, "internal/fxreflect/stack_test.go")
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.uber.org/fx/tools

go 1.19
go 1.20

require (
github.com/bwplotka/mdox v0.9.0
Expand Down

0 comments on commit b8ea551

Please sign in to comment.