Repository navigation
fix(deps): update golang.org/x/term to v0.48.0 and manage golangci-lint via go tool - #87
Merged
Merged
Conversation
…nt via go tool Bumping golang.org/x/term raises the go directive to 1.26.0, which the prebuilt golangci-lint v2.3.0 binary (built with go1.24) refuses to lint. Track golangci-lint as a Go tool dependency in a separate tools/go.mod so Renovate updates it and it is built with the toolchain from go.mod. Bump it to v2.15.0 and replace deprecated reflect.Ptr with reflect.Pointer, flagged by the newer govet inline analyzer. Closes #84 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ctreatma
reviewed
Nov 17, 2026
| go.sum | ||
| tools/go.sum | ||
| # golangci-lint is versioned as a Go tool dependency in tools/go.mod (kept | ||
| # separate from the application module) so Renovate keeps it up to date. |
Contributor
There was a problem hiding this comment.
One thing I've been thinking about since upgrading the github.com/equinix/pulumi-equinix CI toolchain is that we may want to adopt mise (or something similar, but mise is what Pulumi uses) for managing dependencies like language and linter versions across all of our repos (Python/Java/Go SDKs, CLI, Terraform provider, etc.). Renovate apparently supports upgrading dependencies declared in mise.toml.
That said, for now at least this seems fine to me; I don't remember why we adopted this pattern of keeping the lint version in the Makefile (I think it originated in either equinix-sdk-go or terraform-provider-equinix) and restoring Renovate upgrades is good.
ramseydsilva
marked this pull request as ready for review
November 17, 2026 21:19
|
This PR is included in version 0.6.0 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #84. Closes #84
Why
#84 bumps
golang.org/x/termto v0.48.0, which raises thegodirective to1.26.0. The lint job then fails because the prebuilt golangci-lint v2.3.0 binary was built with go1.24:The golangci-lint version was pinned in the
Makefile, and Renovate doesn't track it there.What
golang.org/x/termv0.36.0 → v0.48.0 (x/sys→ v0.50.0,go 1.26.0).tools/go.mod) with atooldirective for golangci-lint (now v2.15.0). It's kept out of the maingo.modso golangci-lint's large dependency tree can't raise the application's dependencies. Renovate's gomod manager picks uptools/go.modlike any othergo.mod.Makefile:GOLANGCI_LINT=go tool -modfile=tools/go.mod golangci-lint(removesGOLANGCI_LINT_VERSION).tools/go.modwith the toolchain fromgo.mod, then runsgolangci-lint-actionwithinstall-mode: none, so we keep its caching and annotations.setup-gocaching now includestools/go.sum.reflect.Ptr→reflect.Pointerininternal/register/register.go. The newer govetinlineanalyzer flags the deprecated alias.This builds golangci-lint from source on every lint run instead of downloading a prebuilt binary. That means compiling a few hundred packages.
setup-go's module/build cache should absorb most of the cost on warm runs, but cold runs (first run, cache eviction, every Renovate bump of golangci-lint) will be noticeably slower. Please compare this PR's lint job time withmainbefore we decide.Alternatives if the time is unacceptable:
install-mode: binary) and have the workflow read the version fromtools/go.mod. Renovate still tracks the version, but the binary's own Go version can again fall behind ourgodirective until golangci-lint releases.customManagersregex forGOLANGCI_LINT_VERSION.hashFiles('tools/go.sum')plus the Go version.The golangci-lint maintainers recommend against installing via
go tool/go install, mainly because dependencies may resolve differently from their tested release. Using an isolated tools module reduces this risk but doesn't remove it.Verified locally
make lint(0 issues),go build ./...,go test ./....🤖 Generated with Claude Code