Skip to content

Commit 81e21e3

Browse files
committed
chore: specify tool versions in sage instead of tools.go
Specifying our tools in tools.go + go.mod triggers dependabot updates for golang.org/x/tools, which is not a dependency that we use in the code base, only for generating the stringer implementations for various enums.
1 parent 7fed21f commit 81e21e3

File tree

4 files changed

+2
-16
lines changed

4 files changed

+2
-16
lines changed

.sage/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ func GoGenerate(ctx context.Context) error {
8282

8383
func Mockgen(ctx context.Context) error {
8484
sg.Logger(ctx).Println("installing mockgen...")
85-
_, err := sgtool.GoInstallWithModfile(ctx, "github.com/golang/mock/mockgen", sg.FromGitRoot("go.mod"))
85+
_, err := sgtool.GoInstall(ctx, "github.com/golang/mock/mockgen", "v1.6.0")
8686
return err
8787
}
8888

8989
func Stringer(ctx context.Context) error {
9090
sg.Logger(ctx).Println("installing stringer...")
91-
_, err := sgtool.GoInstallWithModfile(ctx, "golang.org/x/tools/cmd/stringer", sg.FromGitRoot("go.mod"))
91+
_, err := sgtool.GoInstall(ctx, "golang.org/x/tools/cmd/stringer", "v0.30.0")
9292
return err
9393
}
9494

go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ require (
1515
golang.org/x/net v0.35.0
1616
golang.org/x/sync v0.11.0
1717
golang.org/x/sys v0.30.0
18-
golang.org/x/tools v0.30.0
1918
gotest.tools/v3 v3.5.1
2019
)
2120

@@ -28,5 +27,4 @@ require (
2827
github.com/mdlayher/socket v0.4.1 // indirect
2928
github.com/shurcooL/go v0.0.0-20190704215121-7189cc372560 // indirect
3029
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
31-
golang.org/x/mod v0.23.0 // indirect
3230
)

go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
4040
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
4141
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
4242
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
43-
golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
44-
golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
4543
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
4644
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
4745
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
@@ -66,8 +64,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
6664
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
6765
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
6866
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
69-
golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
70-
golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
7167
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
7268
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
7369
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=

tools.go

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)