You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grpc-gen-go created a framework for writing protoc-gen-go plugins, instead of creating a protoc plugin, a protoc-gen-go plugin might be a better choice.
More specifically, gateway generator should implement github.com/golang/protobuf/protoc-gen-go/generator.Plugin interface. By doing this, it will help
avoiding all the boiler plates, as protoc-gen-go will handle them, and
making gateway generator easier to integrate with other protoc-gen-go plugins
In longer term, this will make it easier to integrate grpc-gateway with bazel/rules_go.
The text was updated successfully, but these errors were encountered:
This sounds like a really interesting proposal. Beyond source compatibility with the protoc-gen-go plugin, can you help me understand what the specific benefits are?
avoiding all the boiler plates, as protoc-gen-go will handle them, and
We already have this boilerplate and it is tested pretty well. We currently handle most of these edge cases and have a fairly well tested codebase in that it is run in many organizations.
making gateway generator easier to integrate with other protoc-gen-go plugins
My understanding is that the composition of protoc generators is achieved by running the compiler multiple times and then using embed = [":proto", ":grpc", ":grpc_gateway"] in your rules_go go_library rule. Can you point me to some documentation that infers otherwise?
I'll drop this FR in favor of #507, as now it has the same interface as the protoc-gen-go to execute. Running the compiler multiple times is fine with me. Though programmatically invoking these compilers is not completely smooth.
The boilerplates are the code handling imports, resolving types etc. Which is probably the most painful part for writing a protoc-gen plugin from scratch.
Also, go team has suggested that the protoc-gen-go plugin interface is designed for grpc alone, and they are not ready to make it a standard way for writing go proto compilers. I think at this point gogo has the best interface to work on for a simple protoc compiler.
grpc-gen-go
created a framework for writingprotoc-gen-go
plugins, instead of creating aprotoc
plugin, aprotoc-gen-go
plugin might be a better choice.More specifically, gateway generator should implement
github.com/golang/protobuf/protoc-gen-go/generator.Plugin
interface. By doing this, it will helpIn longer term, this will make it easier to integrate grpc-gateway with bazel/rules_go.
The text was updated successfully, but these errors were encountered: