Skip to content

ci: unbreak the lint job on the current Go toolchain - #24

Merged
juev merged 3 commits into
mainfrom
hermes/ci-lint-go1.27
Nov 13, 2026
Merged

juev merged 3 commits into
mainfrom
hermes/ci-lint-go1.27

Conversation

@juev

@juev juev commented Nov 13, 2026

Copy link
Copy Markdown
Owner

Why

The lint job cannot run at all. It installs the latest Go through gobrew but pins golangci-lint v2.2.0, which was built with an older Go and cannot decode the current standard library export data:

main.go:18:2: could not import sync/atomic (-: could not load export data: internal error in importing "sync/atomic" (cannot decode "sync/atomic", export data version 5 is greater than maximum supported version 2); please report an issue) (typecheck)
1 issues:
* typecheck: 1

This is not specific to a branch: a workflow_dispatch run on main fails the same way (run 43505748106), so every pull request is red before its own code is looked at.

What changes

  • golangci-lint goes from v2.2.0 to v2.13.0, which is built with Go 1.27 and reads the current export data.
  • goconst no longer applies to tests. Once the linter runs again it reports 17 goconst findings on main_test.go, all of them fixture strings that test tables repeat by design (https://github.com/user/repo, /home/test, user/repo, …). Production code stays covered.

Verification

golangci-lint run ./... with v2.13.0 in this tree: 0 issues. (17 before the settings change), golangci-lint config verify passes, go test ./... passes.

juev added 3 commits November 13, 2026 23:55
The workflow installs the latest Go (gobrew) but pins golangci-lint
v2.2.0, which cannot decode the export data of the current standard
library: "could not import sync/atomic ... export data version 5 is
greater than maximum supported version 2". It fails on main as well, so
no pull request can go green.

Bump the linter to v2.13.0, built with Go 1.27, and stop applying
goconst to tests: test tables repeat fixture strings on purpose.
Bumping golangci-lint to v2.13.0 is not enough: its prebuilt binary
embeds go/types from Go 1.27.0, and the workflow installs Go 1.27.4,
whose export data version (5) is newer than it can decode (4). Build
the linter from source in goinstall mode so it always matches the
toolchain the workflow uses.
Bumping golangci-lint alone does not help: the workflow takes the
latest Go, and 1.27.4 emits export data version 5 while the prebuilt
linter (built with 1.27.0) supports 4, so every typecheck import fails.
Pin Go to 1.27.0 and keep the linter at v2.13.0, which is the pairing
verified locally.
@juev
juev merged commit 2ef860f into main Nov 13, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant