Skip to content

chore: enforce codegen plugin versions match go.mod#427

Open
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-38-enforce-gomod-plugin-sync
Open

chore: enforce codegen plugin versions match go.mod#427
ivanauth wants to merge 1 commit into
authzed:mainfrom
ivanauth:fix/issue-38-enforce-gomod-plugin-sync

Conversation

@ivanauth

Copy link
Copy Markdown
Contributor

Fixes #38

The buf codegen plugins run via go run from 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:depsync mage target (run by CI via lint: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.

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>
@ivanauth
ivanauth requested a review from a team as a code owner July 20, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use CI to enforce that go.mod and remote plugins are synced

1 participant