Skip to content

Conversation

@stefanvanburen
Copy link
Member

No strong feeling on landing this, but just wanted to see how our plugin would look if we integrated https://github.com/bufbuild/protoplugin, which eliminates some of the boilerplate of handling the plugin.

Vaguely relates to #18, although I think the language the plugin is written in now is less important than ever.

Also takes a pass at cleaning up the go code and tests.

No strong feeling on landing this, but just wanted to see how our plugin
would look if we integrated https://github.com/bufbuild/protoplugin,
which eliminates some of the boilerplate of handling the plugin.

Vaguely relates to #18, although I think the language the plugin is
written in now is less important than ever.

Also takes a pass at cleaning up the go code and tests.

Signed-off-by: Stefan VanBuren <svanburen@buf.build>

resp.SupportedFeatures = proto.Uint64(uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) | uint64(pluginpb.CodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS))
resp.MinimumEdition = proto.Int32(int32(descriptorpb.Edition_EDITION_PROTO3))
resp.MaximumEdition = proto.Int32(int32(descriptorpb.Edition_EDITION_2023))
Copy link
Member Author

@stefanvanburen stefanvanburen Feb 6, 2026

Choose a reason for hiding this comment

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

regardless of whether or not we land this, it's probably only a matter of time before we're asked to support edition 2024. (similar: grpc/grpc#40639)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool - I don't mind adding that in this PR, or can be a different one, there doesn't seem to be any new syntax for services as usual

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll add it separately just so it appears separately in the PR list for people looking around.

Signed-off-by: Stefan VanBuren <svanburen@buf.build>
@stefanvanburen
Copy link
Member Author

I know we've already solved our go -> wheel setup with goreleaser, but looks like https://github.com/simonw/go-to-wheel is a new approach (just wanted to mention!).


resp.SupportedFeatures = proto.Uint64(uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) | uint64(pluginpb.CodeGeneratorResponse_FEATURE_SUPPORTS_EDITIONS))
resp.MinimumEdition = proto.Int32(int32(descriptorpb.Edition_EDITION_PROTO3))
resp.MaximumEdition = proto.Int32(int32(descriptorpb.Edition_EDITION_2023))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool - I don't mind adding that in this PR, or can be a different one, there doesn't seem to be any new syntax for services as usual

@stefanvanburen stefanvanburen merged commit 7eb211d into main Feb 9, 2026
23 checks passed
@stefanvanburen stefanvanburen deleted the svanburen/protoplugin branch February 9, 2026 14:54
stefanvanburen added a commit that referenced this pull request Feb 9, 2026
Ref: #119 (comment)

Signed-off-by: Stefan VanBuren <svanburen@buf.build>
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.

2 participants