Skip to content

fix: add missing text and allow_message_set params to protoc plugin#58

Merged
iainmcgin merged 2 commits intoanthropics:mainfrom
hobostay:fix/add-missing-text-param-to-plugin
Apr 23, 2026
Merged

fix: add missing text and allow_message_set params to protoc plugin#58
iainmcgin merged 2 commits intoanthropics:mainfrom
hobostay:fix/add-missing-text-param-to-plugin

Conversation

@hobostay
Copy link
Copy Markdown
Contributor

Summary

  • Adds text=true parameter to protoc-gen-buffa, enabling text format code generation via the protoc/buf plugin workflow
  • Adds allow_message_set=true parameter, enabling message_set_wire_format support via the plugin

Both options were already supported by buffa-build (the build.rs workflow) but were missing from the protoc plugin's parameter parser. This meant users of protoc --buffa_out=... or buf generate could not enable text format generation or message set wire format support.

Missing parameters

The following CodeGenConfig fields had no plugin parameter:

Field Plugin param Status
generate_text text=true Added
allow_message_set allow_message_set=true Added

Other fields like bytes_fields and *_attributes are more complex (lists, nested delimiters) and could be added in a follow-up.

Test plan

  • Added tests for text=true, text default (false), allow_message_set=true, allow_message_set default (false)
  • All 21 plugin tests pass

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@hobostay
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@iainmcgin
Copy link
Copy Markdown
Collaborator

recheck

Copy link
Copy Markdown
Collaborator

@iainmcgin iainmcgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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>
@iainmcgin iainmcgin force-pushed the fix/add-missing-text-param-to-plugin branch from 696b085 to df6efd2 Compare April 23, 2026 16:07
@iainmcgin iainmcgin enabled auto-merge (squash) April 23, 2026 16:12
@iainmcgin iainmcgin merged commit d69ffe3 into anthropics:main Apr 23, 2026
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
@iainmcgin
Copy link
Copy Markdown
Collaborator

[claude code] Thanks for the contribution! ud83cudf89

@iainmcgin
Copy link
Copy Markdown
Collaborator

[claude code] Thanks for the contribution!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants