Skip to content

Commit 992747d

Browse files
committed
Upgrade internal/tools go module for x/tools and mockery
Mockery is failing when run with go 1.24 due to vektra/mockery#914 , so let's upgrade it. Steps to create this diff are just: ``` cd internal/tools go get golang.org/x/tools@latest github.com/vektra/mockery/v2@latest cd ../.. make all ``` and some careful reading to verify the results. There are *some* changes which I think stand a small chance of causing problems: - Our RPC client's mocks now check for `.Get(0).(func(args) (any, error)` signatures where before they did not - I believe anyone using this would've hit a `.Error` further down after these changes, so hopefully this just fixes buggy behavior and does not cause any existing tests to fail - Many funcs gained a `if len(ret) == 0 { panic(..) }` check - Since there's a `ret.Get(0)` immediately after which also panics, I suspect this just gives better error messages. - Our mocks now have a `DoAndReturn` method - Since there are no interfaces for all this, this should be fine, ignoring reflection (which we must ignore or else we will go mad). Otherwise seems like nothing exciting, and this does not affect any user-facing libraries or Go versions. Since this needs a newer CI Go version to build, I've updated those references too.
1 parent d9dcddc commit 992747d

File tree

13 files changed

+450
-510
lines changed

13 files changed

+450
-510
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Added
99
- Added worker.NewV2 with validation on decision poller count (#1370)
10+
- Upgraded internal tooling to support Go 1.24, should be no user-noticeable changes
1011

1112
## [v1.2.10] - 2024-07-10
1213
### Added

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ BIN := $(BUILD)/bin
3333
#
3434
# this can _likely_ remain a major version, as fmt output does not tend to change in minor versions,
3535
# which will allow findstring to match any minor version.
36-
EXPECTED_GO_VERSION := go1.21
36+
EXPECTED_GO_VERSION := go1.24
3737
CURRENT_GO_VERSION := $(shell go version)
3838
ifeq (,$(findstring $(EXPECTED_GO_VERSION),$(CURRENT_GO_VERSION)))
3939
# if you are seeing this warning: consider using https://github.com/travis-ci/gimme to pin your version

docker/buildkite/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.21
1+
FROM golang:1.24
22

33
RUN mkdir -p /go/src/go.uber.org/cadence
44
WORKDIR /go/src/go.uber.org/cadence

internal/internal_workflow_task_handler_mock.go

Lines changed: 17 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/local_dispatcher_mock.go

Lines changed: 13 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/service_invoker_mock.go

Lines changed: 46 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/tools/go.mod

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,66 @@
11
module go.uber.org/cadence/internal/tools
22

3-
go 1.21
3+
go 1.23.0
4+
5+
toolchain go1.24.2
46

57
require (
68
github.com/kisielk/errcheck v1.6.3
79
github.com/mattn/goveralls v0.0.11
810
github.com/mgechev/revive v1.2.5
911
// last used version, would likely be good to upgrade if possible
10-
github.com/vektra/mockery/v2 v2.16.0
12+
github.com/vektra/mockery/v2 v2.53.3
1113
go.uber.org/thriftrw v1.25.0
1214
go.uber.org/yarpc v1.55.0
13-
golang.org/x/tools v0.21.0
15+
golang.org/x/tools v0.32.0
1416
honnef.co/go/tools v0.4.0
1517
)
1618

1719
require (
1820
github.com/BurntSushi/toml v1.2.1 // indirect
1921
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 // indirect
2022
github.com/chavacava/garif v0.0.0-20221024190013-b3ef35877348 // indirect
21-
github.com/chigopher/pathlib v0.12.0 // indirect
23+
github.com/chigopher/pathlib v0.19.1 // indirect
2224
github.com/fatih/color v1.14.1 // indirect
2325
github.com/fatih/structtag v1.2.0 // indirect
24-
github.com/fsnotify/fsnotify v1.5.4 // indirect
26+
github.com/fsnotify/fsnotify v1.8.0 // indirect
27+
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
2528
github.com/golang/mock v1.5.0 // indirect
26-
github.com/hashicorp/hcl v1.0.0 // indirect
27-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
29+
github.com/huandu/xstrings v1.4.0 // indirect
30+
github.com/iancoleman/strcase v0.3.0 // indirect
31+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2832
github.com/jessevdk/go-flags v1.4.0 // indirect
29-
github.com/magiconair/properties v1.8.6 // indirect
30-
github.com/mattn/go-colorable v0.1.13 // indirect
31-
github.com/mattn/go-isatty v0.0.17 // indirect
33+
github.com/jinzhu/copier v0.4.0 // indirect
34+
github.com/mattn/go-colorable v0.1.14 // indirect
35+
github.com/mattn/go-isatty v0.0.20 // indirect
3236
github.com/mattn/go-runewidth v0.0.14 // indirect
3337
github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 // indirect
3438
github.com/mitchellh/go-homedir v1.1.0 // indirect
3539
github.com/mitchellh/mapstructure v1.5.0 // indirect
3640
github.com/olekukonko/tablewriter v0.0.5 // indirect
37-
github.com/pelletier/go-toml v1.9.5 // indirect
38-
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
41+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
3942
github.com/pkg/errors v0.9.1 // indirect
4043
github.com/rivo/uniseg v0.4.3 // indirect
41-
github.com/rs/zerolog v1.27.0 // indirect
42-
github.com/spf13/afero v1.8.2 // indirect
43-
github.com/spf13/cast v1.5.0 // indirect
44-
github.com/spf13/cobra v1.4.0 // indirect
45-
github.com/spf13/jwalterweatherman v1.1.0 // indirect
46-
github.com/spf13/pflag v1.0.5 // indirect
47-
github.com/spf13/viper v1.12.0 // indirect
48-
github.com/subosito/gotenv v1.4.0 // indirect
44+
github.com/rs/zerolog v1.33.0 // indirect
45+
github.com/sagikazarmark/locafero v0.7.0 // indirect
46+
github.com/sourcegraph/conc v0.3.0 // indirect
47+
github.com/spf13/afero v1.12.0 // indirect
48+
github.com/spf13/cast v1.7.1 // indirect
49+
github.com/spf13/cobra v1.8.1 // indirect
50+
github.com/spf13/pflag v1.0.6 // indirect
51+
github.com/spf13/viper v1.20.0 // indirect
52+
github.com/subosito/gotenv v1.6.0 // indirect
4953
github.com/uber/tchannel-go v1.32.1 // indirect
5054
go.uber.org/atomic v1.9.0 // indirect
5155
go.uber.org/fx v1.13.1 // indirect
52-
go.uber.org/multierr v1.6.0 // indirect
56+
go.uber.org/multierr v1.11.0 // indirect
5357
go.uber.org/zap v1.17.0 // indirect
54-
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
5558
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9 // indirect
56-
golang.org/x/mod v0.17.0 // indirect
57-
golang.org/x/sync v0.7.0 // indirect
58-
golang.org/x/sys v0.20.0 // indirect
59-
golang.org/x/term v0.0.0-20220526004731-065cf7ba2467 // indirect
60-
golang.org/x/text v0.6.0 // indirect
61-
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
62-
gopkg.in/ini.v1 v1.66.6 // indirect
59+
golang.org/x/mod v0.24.0 // indirect
60+
golang.org/x/sync v0.13.0 // indirect
61+
golang.org/x/sys v0.32.0 // indirect
62+
golang.org/x/term v0.29.0 // indirect
63+
golang.org/x/text v0.22.0 // indirect
6364
gopkg.in/yaml.v2 v2.4.0 // indirect
6465
gopkg.in/yaml.v3 v3.0.1 // indirect
6566
)

0 commit comments

Comments
 (0)