-
Notifications
You must be signed in to change notification settings - Fork 6
Switch generator to use bufbuild/protoplugin #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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)) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
|
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)) |
There was a problem hiding this comment.
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
Ref: #119 (comment) Signed-off-by: Stefan VanBuren <svanburen@buf.build>
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.