Repository navigation
ci: fix Build job on Go 1.27 (golangci-lint v2.14.0, gosec with x/tools v0.52.0) - #41
Merged
Merged
Conversation
golangci-lint v2.11.2 and gosec v2.29.0 pin golang.org/x/tools <= v0.49.0, which cannot decode Go 1.27 export data, so the Build job failed with "export data version 5 is greater than maximum supported version" on every package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v2.11.2 panics analysing Go 1.27's internal/poll on linux
("buildir: unexpected expr: *ast.KeyValueExpr"), so build v2.14.0
instead. Its revive adds unexported-return, which flags two long-standing
public constructors; exclude it like var-naming.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes the red Build check on
alauda-v*PRs (it was already failing on #38 and #40).Once
go.modmoved to Go 1.27, both tools installed byscripts/devtools.shbroke:golang.org/x/toolsv0.49.0, which cannot decode Go 1.27 export data, so every package failed to type-check:cannot decode "os", export data version 5 is greater than maximum supported version.Fix: build the same gosec version against
golang.org/x/tools@v0.52.0in a throwaway module.internal/pollon linux:buildir: unexpected expr: *ast.KeyValueExpr. Fix: v2.14.0, the same version cosign uses. Its revive addsunexported-return, which flags two long-standing public constructors (NewFrontMatterHandler,NewWriteInPlaceHandler); it is excluded in.golangci.ymlthe same wayvar-namingalready is.Verified locally with go1.27.2:
scripts/devtools.sh && make local buildpasses (cspell 0, gosec 0 issues, golangci-lint 0 issues on GOOS=linux, tests OK).Note: merging to
alauda-v4.47.1will auto-tagv4.47.2-alauda-34(CI-only change, same binary).🤖 Generated with Claude Code