chore: enforce codegen plugin versions match go.mod#427
Open
ivanauth wants to merge 1 commit into
Open
Conversation
The buf codegen plugins run via 'go run' from magefiles/go.mod, while the generated code links the runtime libraries in the root go.mod, so the two can silently drift apart. Add a lint:depsync mage target (run by CI via lint:extra) that compares the shared plugin/runtime module versions across both go.mod files. Fix the existing drift by bumping grpc-gateway v2.28.0 -> v2.29.0 in magefiles/go.mod. go mod tidy pulls in the versions that release requires: grpc v1.79.1 -> v1.80.0, x/text v0.35.0 -> v0.36.0, and the matching genproto revisions. Regenerating with the aligned versions produced no changes to the generated code. Signed-off-by: ivanauth <ivan@authzed.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 #38
The buf codegen plugins run via
go runfrom magefiles/go.mod, while generated code links the runtime libraries in the root go.mod — so the two can silently drift apart.Adds a
lint:depsyncmage target (run by CI vialint:extra) that compares the shared plugin/runtime module versions across both go.mod files and fails with an actionable message on mismatch.Also fixes the existing drift: grpc-gateway v2.28.0 → v2.29.0 in magefiles/go.mod. The accompanying transitive bumps (grpc 1.80.0, x/text 0.36.0, genproto) are required by that release. Regenerating produced no changes to the generated code.