Fix Go version inconsistency: make go.mod authoritative#876
Merged
Conversation
- WORKSPACE: change go_register_toolchains from 1.22.8 to 1.21.13 (latest patch matching go.mod's `go 1.21`) - release-publisher.yml: replace hardcoded `go-version: 1.25.6` with `go-version-file: 'go.mod'` (same pattern ci.yaml already uses) - Pin actions/setup-go from @master to @v6 for stability https://claude.ai/code/session_01BJknyuarF3vboYMFKJRqS8
Add go_version.bzl repository rule that parses go.mod at build time and exports GO_VERSION for use by go_register_toolchains. This eliminates the need to manually keep the WORKSPACE version in sync. Also update go.mod from "go 1.21" to "go 1.21.13" since Bazel's go_register_toolchains requires a full major.minor.patch version. https://claude.ai/code/session_01BJknyuarF3vboYMFKJRqS8
- Move verify-labels job from lint.yml into label-check.yml so that label add/remove events only re-run the label check, not shellcheck and golangci-lint - Remove labeled/unlabeled triggers from lint.yml - Update CLAUDE.md to list the specific required labels - Fix go_version.bzl: Starlark split() requires an explicit separator https://claude.ai/code/session_01BJknyuarF3vboYMFKJRqS8
golang.org/x/mod@v0.21.0 (pulled in by gazelle_dependencies) requires go >= 1.22.0. The original WORKSPACE had 1.22.8 for this reason — the go.mod directive was just outdated. https://claude.ai/code/session_01BJknyuarF3vboYMFKJRqS8
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.
(latest patch matching go.mod's
go 1.21)go-version: 1.25.6withgo-version-file: 'go.mod'(same pattern ci.yaml already uses)https://claude.ai/code/session_01BJknyuarF3vboYMFKJRqS8