Skip to content

Commit c11b45b

Browse files
insomniusclaude
andcommitted
ci: pin Go 1.23 in the lint job to match golangci-lint v1.64.5
CI run 24932255728 had Verify and Test Coverage green but Lint failed on 10 typecheck errors of the form: suite.Assert undefined (type *HttpSuiteTest has no field or method Assert) The methods exist (testify's suite.Suite, embedded transitively), and both `go build` and `go test ./...` resolve them fine. The failure is exclusive to golangci-lint's bundled type-checker, which can't follow methods promoted from external packages when the toolchain is newer than the linter's build base. golangci-lint v1.64.5 was built against Go 1.23. Pinning `go-version: '1.23'` in the lint job aligns the typechecker with its own ABI. Verify and Test Coverage stay on `stable` so production code is exercised against the newest supported toolchain. The pin is documented inline so a future bump of golangci-lint also bumps the Go version in lockstep. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 07fb0fc commit c11b45b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/general.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,20 @@ jobs:
7979
- name: Set up Go
8080
uses: actions/setup-go@v5
8181
with:
82-
go-version: stable
82+
# golangci-lint v1.64.5 was built against Go 1.23. Pinning matches
83+
# the linter's bundled type-checker version; using `stable` here
84+
# makes typecheck fail to resolve methods promoted through embedded
85+
# external types (e.g. testify's suite.Suite.Assert), even though
86+
# `go build` and `go test` succeed against the same code.
87+
go-version: '1.23'
8388
check-latest: true
8489
cache: true
8590

8691
- name: golangci-lint
8792
uses: golangci/golangci-lint-action@v6
8893
with:
8994
# Pin a recent stable release; bump with intent, not passively.
95+
# When bumping the linter, also bump go-version above to match.
9096
version: v1.64.5
9197
args: --timeout=5m
9298

0 commit comments

Comments
 (0)