[v0.21.x-branch] Backport #11200: build: bump Go language to 1.26.8 and toolchain to 1.27.1 - #11210
ziggie1984 wants to merge 4 commits into
Conversation
Keep lnd compatible with the previous stable Go release by updating the language version in every tracked go.mod file to Go 1.26.8. Move build and release tooling to Go 1.27.1, including CI, Docker images, the Makefile, protobuf generation, the linter configuration, and mobile build documentation. Update the installation documentation and official Linux archive checksums for Go 1.26.8 as well. (cherry picked from commit b1f9ca6)
Upgrade the custom golangci-lint from v2.4.0 to v2.13.2 because the older version reports false type-checking errors for generic mutex code when it runs with Go 1.27. Refresh the tools module dependencies, account for the renamed exhaustruct_v5 linter, and disable the deprecated gomodguard while leaving gomodguard_v2 active. Apply Go 1.27's gofmt output to the PSBT test's composite-literal return. Lower the consecutive-SCID zlib test boundary from 30,794 to 30,792. Go 1.27 changed compress/flate output, making 30,793 SCIDs exceed the 65,535-byte Lightning message limit while 30,792 still fit. (cherry picked from commit 6b54a38)
The protobuf generator uses Go's formatting packages and is now compiled inside the Go 1.27.1 Docker image. This changes generated doc-comment formatting and causes rpc-check to report stale checked-in bindings. Regenerate the RPC bindings with the newly pinned image. The resulting changes affect comments only; protobuf schemas and generated API code stay unchanged. (cherry picked from commit dd52310)
The linter configuration uses default: all, so upgrading golangci-lint also enables checks introduced after v2.4. Adopt canonicalheader, clickhouselint, godoclint, iotamixing, and unqueryvet because they add focused HTTP, documentation, const-block, and SQL safeguards. Fix the canonical WebSocket protocol header spelling required by the expanded canonicalheader implementation. Update twelve existing doc comments to begin with their declared symbol names as required by godoclint. Keep modernize disabled for now because its findings require broader code changes that should be reviewed separately against the Go 1.26 support baseline. (cherry picked from commit bada7ea)
a0240a4 to
4a4cdb8
Compare
🔴 PR Severity: CRITICAL
🔴 Critical (4 files)
🟠 High (28 files)
🟡 Medium (12 files)
🟢 Low (24 files)
AnalysisThis is a mechanical Go toolchain bump (Go 1.26.8 / toolchain 1.27.1) backported to the v0.21.x branch. Almost every non-test, non-generated file changes only 1-2 lines (a To override, add a |
Backport of #11200.
This backports the Go language bump to 1.26.8, the toolchain bump to 1.27.1, regenerated RPC bindings, and the focused golangci-lint v2.13 checks to
v0.21.x-branch.Backport notes:
Verification:
make check-go-versiongo.modfiles declare Go 1.26.8cd tools && go mod tidy -diff && go mod verifymake rpcproduces no tracked diff./scripts/check-rest-annotations.shfromlnrpcgo test -run '^$' ./...go test ./lnwirego test ./lnrpc/...