Skip to content

Commit 287a711

Browse files
committed
all: update the x/tools dependency to fix the build with Go 1.25 (google#432) #1
2 parents 04d7214 + 3d8ba9a commit 287a711

File tree

6 files changed

+22
-28
lines changed

6 files changed

+22
-28
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
os: [ubuntu-latest, macos-latest, windows-latest]
22-
go-version: [1.23.x]
22+
go-version: [1.25.x]
2323
runs-on: ${{ matrix.os }}
2424
env:
2525
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module github.com/wireinject/wire
22

3-
go 1.23.0
3+
go 1.19
44

55
require (
6-
github.com/google/go-cmp v0.7.0
6+
github.com/google/go-cmp v0.6.0
77
github.com/google/subcommands v1.2.0
88
github.com/pmezard/go-difflib v1.0.0
9-
golang.org/x/tools v0.36.0
9+
golang.org/x/tools v0.24.1
1010
)
1111

1212
require (
13-
golang.org/x/mod v0.27.0 // indirect
14-
golang.org/x/sync v0.16.0 // indirect
13+
golang.org/x/mod v0.20.0 // indirect
14+
golang.org/x/sync v0.8.0 // indirect
1515
)

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
2-
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
1+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
2+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
33
github.com/google/subcommands v1.2.0 h1:vWQspBTo2nEqTUFita5/KeEWlUL8kQObDFbub/EN9oE=
44
github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
55
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
66
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7-
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
8-
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
9-
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
10-
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
11-
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
12-
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
7+
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
8+
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
9+
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
10+
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
11+
golang.org/x/tools v0.24.1 h1:vxuHLTNS3Np5zrYoPRpcheASHX/7KiGo+8Y4ZM1J2O8=
12+
golang.org/x/tools v0.24.1/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=

internal/runtests.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,10 @@ if [[ $# -gt 0 ]]; then
2121
exit 64
2222
fi
2323

24-
# Run Go tests. Only do coverage for the Linux build
25-
# because it is slow, and codecov will only save the last one anyway.
24+
# Run Go tests.
2625
result=0
27-
if [[ "${RUNNER_OS:-}" == "Linux" ]]; then
28-
echo "Running Go tests (with coverage)..."
29-
go test -mod=readonly -race -coverpkg=./... -coverprofile=coverage.out ./... || result=1
30-
if [ -f coverage.out ] && [ $result -eq 0 ]; then
31-
bash <(curl -s https://codecov.io/bash)
32-
fi
33-
else
34-
echo "Running Go tests..."
35-
go test -mod=readonly -race ./... || result=1
36-
fi
26+
echo "Running Go tests..."
27+
go test -mod=readonly -race ./... || result=1
3728

3829
# No need to run other checks on OSs other than linux.
3930
# We default RUNNER_OS to "Linux" so that we don't abort here when run locally.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
example.com/foo/wire.go:x:y: name foo not exported by package bar
1+
example.com/foo/wire.go:x:y: name foo not exported by package bar

internal/wire/wire_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,10 @@ func loadTestCase(root string, wireGoSrc []byte) (*testCase, error) {
476476
wantWireError := err == nil
477477
var wantWireErrorStrings []string
478478
if wantWireError {
479-
wantWireErrorStrings = strings.Split(string(wireErrb), "\n\n")
479+
for _, errs := range strings.Split(string(wireErrb), "\n\n") {
480+
// Allow for trailing newlines, which can be hard to remove in some editors.
481+
wantWireErrorStrings = append(wantWireErrorStrings, strings.TrimRight(errs, "\n\r"))
482+
}
480483
} else {
481484
if !*record {
482485
wantWireOutput, err = ioutil.ReadFile(filepath.Join(root, "want", "wire_gen.go"))

0 commit comments

Comments
 (0)