Bump golangci-lint to v2.13.2 so it can read Go 1.27 export data #3

Merged
geusebio merged 1 commit from fix/golangci-lint-reads-go-1-27 into main 2026-09-02 10:20:54 +00:00
Owner

Why

Renovate's Go 1.27 bump in the agent repo (run 178, PR #34) turned the Lint step red without reporting a single finding:

internal/forward/forward.go:6:8: could not import strings (… could not import internal/goarch
(-: could not load export data: internal error in importing "internal/goarch"
(cannot decode "internal/goarch", export data version 4 is greater than maximum supported
version 2))) (typecheck)

golangci-lint typechecks through whichever golang.org/x/tools it was built against, and the pinned v2.6.1 carries v0.38.0 — too old to decode the export data Go 1.27's compiler emits. The linter could not import the standard library, so it linted nothing and exited 1. Nothing was wrong with the code.

v2.13.2 (x/tools v0.49.0) reads it. Measured on Go 1.27.1:

golangci-lint x/tools Result
v2.6.1 (old pin) v0.38.0 typecheck failure on every package
v2.12.2 v0.44.0 typechecks
v2.13.2 (new pin) v0.49.0 typechecks

So the pin has a floor as well as the ceiling it was introduced for: a Go bump needs the linter bumped alongside it, or the gate stops running rather than going red. hack/lint.sh now says so where the pin lives.

.github/workflows/ci.yaml also grew a note that its go install version must equal hack/lint.sh's VERSION — on a mismatch the script ignores the installed binary and falls back to the container, whose -v "$PWD":/app in a job step mounts an empty directory, i.e. a green Lint step that read no code.

Carried across all four Go repos

The pin and .golangci.yaml are duplicated on purpose and are meant to stay identical, so this lands as the same change in each: someones.computer_agent, someones.computer_scclient, someones.computer_tray, someones.computer_terraform. Both file headers still said "three repos" and did not mention the terraform provider; they name four now.

Verified

This repo has no CI workflow yet, so hack/lint.sh is the only place the pin lives — and the local gate is the whole of all-green here. Nothing trips the newer rulesets.

  • ./hack/lint.sh0 issues on Go 1.27.1 and on Go 1.26.7.
  • go vet ./... clean, go test ./... passes, on Go 1.27.1.
  • shellcheck -x -S warning hack/lint.sh clean.
  • No code changed at all — the diff is the pin plus comments.
  • Not a visual change, so no screenshots.

Opened ready rather than draft because this repo has no .github/workflows/, so there is no CI run coming to wait on — the local gate above is all of all-green here.

Follow-up, deliberately out of scope

The platform repo's submodule pins move once these four merge, not before — make lint-submodule-pins requires a pin on the default branch.

## Why Renovate's Go 1.27 bump in the agent repo ([run 178](https://git.grey.ooo/Grey.ooo/someones.computer_agent/actions/runs/178), PR [#34](https://git.grey.ooo/Grey.ooo/someones.computer_agent/pulls/34)) turned the `Lint` step red without reporting a single finding: ``` internal/forward/forward.go:6:8: could not import strings (… could not import internal/goarch (-: could not load export data: internal error in importing "internal/goarch" (cannot decode "internal/goarch", export data version 4 is greater than maximum supported version 2))) (typecheck) ``` golangci-lint typechecks through whichever `golang.org/x/tools` it was built against, and the pinned **v2.6.1** carries **v0.38.0** — too old to decode the export data Go 1.27's compiler emits. The linter could not import the standard library, so it linted nothing and exited 1. Nothing was wrong with the code. `v2.13.2` (x/tools v0.49.0) reads it. Measured on Go 1.27.1: | golangci-lint | x/tools | Result | |---|---|---| | v2.6.1 (old pin) | v0.38.0 | typecheck failure on every package | | v2.12.2 | v0.44.0 | typechecks | | v2.13.2 (new pin) | v0.49.0 | typechecks | So the pin has a **floor** as well as the ceiling it was introduced for: a Go bump needs the linter bumped alongside it, or the gate stops running rather than going red. `hack/lint.sh` now says so where the pin lives. `.github/workflows/ci.yaml` also grew a note that its `go install` version must equal `hack/lint.sh`'s `VERSION` — on a mismatch the script ignores the installed binary and falls back to the container, whose `-v "$PWD":/app` in a job step mounts an empty directory, i.e. a green `Lint` step that read no code. ## Carried across all four Go repos The pin and `.golangci.yaml` are duplicated on purpose and are meant to stay identical, so this lands as the same change in each: `someones.computer_agent`, `someones.computer_scclient`, `someones.computer_tray`, `someones.computer_terraform`. Both file headers still said "three repos" and did not mention the terraform provider; they name four now. ## Verified This repo has no CI workflow yet, so `hack/lint.sh` is the only place the pin lives — and the local gate is the whole of all-green here. Nothing trips the newer rulesets. - `./hack/lint.sh` → **0 issues** on **Go 1.27.1** and on **Go 1.26.7**. - `go vet ./...` clean, `go test ./...` passes, on Go 1.27.1. - `shellcheck -x -S warning hack/lint.sh` clean. - No code changed at all — the diff is the pin plus comments. - Not a visual change, so no screenshots. Opened ready rather than draft because this repo has no `.github/workflows/`, so there is no CI run coming to wait on — the local gate above is all of all-green here. ## Follow-up, deliberately out of scope The platform repo's submodule pins move once these four merge, not before — `make lint-submodule-pins` requires a pin on the default branch.
golangci-lint typechecks through whichever golang.org/x/tools it was built
against, and v2.6.1 carries v0.38.0 — old enough that it cannot decode the
export data Go 1.27's compiler emits. On the Go 1.27 bump the Lint step did
not report a finding, it failed to import the standard library:

  could not import strings (… could not import internal/goarch (-: could not
  load export data: internal error in importing "internal/goarch" (cannot
  decode "internal/goarch", export data version 4 is greater than maximum
  supported version 2))) (typecheck)

v2.13.2 (x/tools v0.49.0) reads it. The pin therefore has a floor as well as
a ceiling, which hack/lint.sh now says: a Go bump needs the linter bumped
alongside it, or the gate stops running rather than going red.

This repo has no CI workflow yet, so only hack/lint.sh carries the pin.
Nothing here trips the newer rulesets: hack/lint.sh reports 0 issues on Go
1.27.1 and on Go 1.26.7, so the bump is the whole change. The pin is carried
across all four Go repos in lockstep, which is what the header of both this
script and .golangci.yaml asks for — those headers still described three
repos and omitted this one, so they name four now.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grey.ooo/someones.computer_terraform!3
No description provided.