build: bump Nix toolchain to Go 1.26 - #212
Conversation
#207 pulled in golang.org/x/crypto v0.56.0, which declares `go 1.26.0` in its own go.mod and so forced this module's go directive from 1.25.10 to 1.26.0. Nothing bumped the Nix toolchain to match, and both CI jobs run inside the dev shell, so main has been red since: Dirty: can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.0) Tests: compile: version "go1.26.0" does not match go tool version "go1.25.2" (building ./cmd under -race) Reverting the go directive is not an option without dropping the security patch, and the locked nixpkgs (Nov 2025) has no go_1_26 attribute, so the input is updated alongside the pin. That update also moves golangci-lint 2.6.0 -> 2.13.2, whose staticcheck reports the Temporal SDK SearchAttributes deprecation on five pre-existing call sites. Migrating to TypedSearchAttributes changes how attributes are registered and searched, which does not belong in a toolchain bump, so .golangci.yml excludes just that one diagnostic and it is tracked separately.
✅ Approve — automated reviewThe toolchain and lockfile updates are consistent with Go 1.26, and the lint exclusion is narrowly scoped to the described pre-existing deprecation diagnostics. No actionable regressions were found. No findings. |
|
This PR bumps the Nix toolchain from Go 1.25 to 1.26 ( StandardsLow — repo-global lint suppression without path scoping or a tracking reference No other confirmed material finding: no documented coding standards exist that this diff can breach, and the config-only change gives other baseline smells nothing to attach to. SpecThe Spec axis has no confirmed material finding. Verified against the PR description:
Reviewed independently by GLM (glm-5.3-flash) and DeepSeek (deepseek-v4-pro-0813) via Shipfox; verified and synthesized by GLM. |
Problem
mainis red, and has been since #207. Every PR branched off it inherits the failure.#207 pulled in
golang.org/x/crypto v0.56.0as a security update. That module declaresgo 1.26.0in its own go.mod, which forced this module's go directive fromgo 1.25.10togo 1.26.0. Nothing bumped the Nix toolchain to match, and both CI jobs run inside the dev shell:can't load config: the Go language version (go1.25) used to build golangci-lint is lower than the targeted Go version (1.26.0)—just lintexits 3compile: version "go1.26.0" does not match go tool version "go1.25.2"building./cmdunder-race— exits 1Reverting the go directive would mean dropping the security patch, so the toolchain has to move instead.
Fix
flake.nix:goVersion = 25→26.flake.lock: the nixpkgs input had to move with it — the locked revision (b3d51a0, Nov 2025) has nogo_1_26attribute at all. Now on8ce4ef6(Sep 2026), which provides Go 1.26.7..golangci.yml: new file, one exclusion — see below.Why the lint exclusion
The nixpkgs update also carries golangci-lint 2.6.0 → 2.13.2, whose staticcheck reports
SA1019for the Temporal SDK's deprecatedSearchAttributeson five pre-existing call sites (internal/triggers/listener.go,internal/triggers/workflow_trigger.go×2,internal/workflow/manager.go,internal/workflow/run.go).Migrating to
TypedSearchAttributeschanges how search attributes are registered and queried — a behavioural change that deserves its own PR and its own testing, not a silent rider on a toolchain bump. So this adds a narrowly-scoped exclusion for that one diagnostic (matched on the message, not blanket-disabling staticcheck) with the reasoning inline, to be removed by the migration PR.Happy to fold the migration in here instead if reviewers would rather not carry the exclusion.
Verification
Run in the dev shell on this branch:
just pre-commit(what Dirty runs) —0 issues, and leaves the tree clean apart from the three files in this PR.just tests(what Tests runs) — every package passes,./cmdincluded.go versionin the shell reportsgo1.26.7;golangci-lint --versionreports 2.13.2 built with go1.27.1.One local gotcha worth knowing, not a repo issue: if you have
GOROOTexported in your shell (direnv or profile) pointing at a downloadedgolang.org/toolchain@...module, the dev shell inherits it and you get a confusingcompile: version ... does not matcheven after this change.unset GOROOTbefore entering.