Manage tools with Go modules - #222
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nojnhuh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202 // indirect | ||
| github.com/golangci/go-printf-func-name v0.1.1 // indirect | ||
| github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect | ||
| github.com/golangci/golangci-lint/v2 v2.12.1 // indirect |
There was a problem hiding this comment.
This is intentionally out of date to make sure dependabot is wired up correctly for this new module.
615ce04 to
9672bac
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nojnhuh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This change implements the approach described in #192 to manage tool dependencies like
golangci-lint,helm, andconversion-genamong others:hack/tools/go.{mod,sum}record tool dependenciesgo get -modfile hack/tools/go.mod -tool <module path>go get -modfile hack/tools/go.mod -tool helm.sh/helm/v4/cmd/helm@v4.2.0go tool -modfile hack/tools/go.mod <tool>go tool -modfile hack/tools/go.mod kind versionhack/tools/golangci-lint/go.{mod,sum}is a module only forgolangci-lintsince they claim to be particularly sensitive to dependency versions.make lintinvokes the tool version.Notably, building and running the driver locally may not have depended on a local Go installation before, but now it does. Running all of the scripts in a dev container with Go installed probably still works, but I'm open to fixing issues.
Fixes #192