fix: add missing text and allow_message_set params to protoc plugin#58
Merged
iainmcgin merged 2 commits intoanthropics:mainfrom Apr 23, 2026
Merged
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
Collaborator
|
recheck |
iainmcgin
approved these changes
Apr 23, 2026
Collaborator
iainmcgin
left a comment
There was a problem hiding this comment.
[claude code] Code review: clean, well-scoped change. Parser style and defaults match existing convention. Tests cover both parameters. LGTM.
The protoc-gen-buffa plugin was missing support for the `text` and `allow_message_set` codegen options that are available in buffa-build. This made text format generation and message_set_wire_format support unavailable when using the protoc/buf plugin workflow. Add `text=true` and `allow_message_set=true` as recognized plugin parameters, matching the existing pattern for `json`, `views`, etc. Co-authored-by: Qiaochu Hu <110803307+hobostay@users.noreply.github.com>
696b085 to
df6efd2
Compare
Collaborator
|
[claude code] Thanks for the contribution! ud83cudf89 |
Collaborator
|
[claude code] Thanks for the contribution! |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
text=trueparameter to protoc-gen-buffa, enabling text format code generation via the protoc/buf plugin workflowallow_message_set=trueparameter, enabling message_set_wire_format support via the pluginBoth options were already supported by
buffa-build(the build.rs workflow) but were missing from the protoc plugin's parameter parser. This meant users ofprotoc --buffa_out=...orbuf generatecould not enable text format generation or message set wire format support.Missing parameters
The following
CodeGenConfigfields had no plugin parameter:generate_texttext=trueallow_message_setallow_message_set=trueOther fields like
bytes_fieldsand*_attributesare more complex (lists, nested delimiters) and could be added in a follow-up.Test plan
text=true,textdefault (false),allow_message_set=true,allow_message_setdefault (false)🤖 Generated with Claude Code