Repository navigation
build: bump Go to 1.27 and pin golangci-lint in go.mod - #910
Merged
Merged
Conversation
nooga
approved these changes
Sep 19, 2026
nnunley
force-pushed
the
build/go-1.27
branch
from
September 19, 2026 23:08
d02e689 to
17e54bc
Compare
nooga
force-pushed
the
build/go-1.27
branch
from
September 19, 2026 23:23
17e54bc to
02bcf7c
Compare
nooga
approved these changes
Sep 19, 2026
nooga
left a comment
Owner
There was a problem hiding this comment.
CI green after rebasing onto main (which picked up #909's TinyGo 0.42.0 bump, resolving the earlier lint/tinygo-wasi-build failures). Mechanical, well-verified toolchain bump: single go.mod/go.sum pin for golangci-lint, matching Makefile fix. No concerns.
CI resolves Go from go.mod (go-version-file), so the version bump moves
local builds and every workflow together. Two toolchain pins had to move
with it, because both refuse Go 1.27:
- golangci-lint v2.12.2 is built with go1.26.2, and fails with "the Go
language version (go1.26) used to build golangci-lint is lower than
the targeted Go version (1.27.1)". v2.13.2 is built with go1.27.0.
- TinyGo v0.41.1 accepts "go version 1.19 through 1.26"; v0.42.0
raises the maximum supported Go version to 1.27.
golangci-lint was pinned twice -- exactly in the Makefile, by minor in
the workflow -- so the two could drift within a minor unnoticed. It now
has one pin, the go.mod tool directive, which both consumers read:
'go tool' in the Makefile, and the CI action, which finds the version in
go.mod when no 'version:' input is set. That mirrors how go.mod already
pins the Go toolchain itself. The tool directive records golangci-lint's
dependency graph, which the module was always building against but never
stated.
Moving the Makefile to 'go tool' also fixes 'make lint', which was broken
on any host with go on PATH: $(GO) is only defined when makeplus/makes is
included, so the recipe ran BSD 'install' and exited 64.
nooga
force-pushed
the
build/go-1.27
branch
from
September 19, 2026 23:45
02bcf7c to
98a8c74
Compare
1 of 10 tasks
This was referenced Sep 20, 2026
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.
Why
Move the project onto the current Go release line. Every workflow resolves its Go version with
go-version-file: go.mod, sogo.modis the single place to change and local builds and CI move together.Two toolchain pins have to move with it, because both refuse Go 1.27 outright:
go1.26.2: "the Go language version (go1.26) used to build golangci-lint is lower than the targeted Go version (1.27.1)". v2.13.2 is built withgo1.27.0.Both were verified rather than inferred — the golangci-lint figures come from
go versionrun against the actual released binaries.One pin, in go.mod
golangci-lint was pinned in two places that had to be updated in lockstep by hand, and asymmetrically:
Makefilepinned the exact patch (v2.12.2) while the workflow pinned the minor (v2.12, silently resolving to the newest 2.12.x). They could drift within a minor with nothing to catch it.It now has exactly one pin — the
tooldirective ingo.mod— and both consumers read it from there:make lintrunsgo tool golangci-lint run.version:input; with it unset the action reads the version fromgo.moditself. Aversion:input would silently win over go.mod, so the workflow comment says not to add one back.This mirrors how
go.modalready pins the Go toolchain. Thetooldirective also records golangci-lint's dependency graph, which the module was always building against but never stated — that is the bulk of thego.sumdiff.Incidental fix
make lintwas broken on any host withgoonPATH.$(GO)is defined only whenmakeplus/makesis included, which is skipped whengois already present, so$(GO) install …ran BSDinstalland exited 64. Running throughgo toolremoves the install machinery and the bug with it.Verification
On
go1.27.1/ darwin-arm64:make build(forced clean, incl. smoke + boot budget)make lint(go tool golangci-lint, v2.13.2)go vet ./...make check-default-depsmake check-generatedgo test -short ./... -skip TestClojureTestSuitego build -tags gogen_ir ./...go build -tags glplat_ebiten .Go 1.27.1 is allocation-neutral against 1.26.5 on identical source:
IRCompile5,229,208 → 5,218,304 B/op,InitFromLGB14,353 → 14,353 allocs/op.Note for contributors after this lands
pkg/genmanifest/depmanifest.goruns its dependency query withGOTOOLCHAIN=localon purpose, so the committed manifest describes one reference graph on every host. That means thegoon yourPATHmust itself be ≥ 1.27 — it cannot switch toolchains. With an oldergofirst onPATH(a version manager pinning 1.26.x, say),make generateandmake check-generatedfail with:CI is unaffected, since
setup-goinstalls the version named ingo.mod.Note on the pre-push ratchet
Pushed past the local
bench-ratchetpre-push gate deliberately. The gate is red onmainitself for unrelated reasons:checkexits non-zero from the deterministic (allocs/bytes) comparison before timing is considered, and the four failing metrics trace to two deliberate commits — see #912 (#764's array-map trade) and #913 (#838/#863 onInitFromLGB). This change touches neither.A Go version bump also moves the ratchet's machine fingerprint (
go1.26.5→go1.27.1), so thearm64/Apple M3profile recaptured in #891 will want recapturing under the new toolchain once this lands.🤖 Generated with Claude Code