Switch generator to use bufbuild/protoplugin#119
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.
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.
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.
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.
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.