buf-version-pinning
buf.gen.yaml declares which protoc plugins (and which versions) generate
the Go, TypeScript, and Python output. Bumping a plugin version regenerates
every file the plugin produces, even for protos that didn't change. This
is normal but easy to confuse with bugs.
What to do
- When the diff is a
buf.gen.yamlplugin version bump, expect a wide regen sweep — surface that to the user before they assume the diff is wrong. - After the change, run
just genand group the diff by language so the user can see scope at a glance. - If
buf.lockchanged, confirmbuf.yamldeps changed correspondingly (or thatbuf dep updatewas run intentionally). - Check whether any consumers of the generated output rely on a specific plugin version (e.g. a Connect generator API change) before merging.
What to avoid
- Don't pin a plugin version to "make the diff smaller". The repo prefers
current pinned versions across all
buf.gen.yamlfiles. - Don't hand-edit
buf.lock.