Closed sbunce closed 7 years ago
This will need a bit of thought. You're right that this is the required mechanism on the CodeGeneratorRequest edge, but I'm not sure I want to bake this in in this form. The specific plugins=grpc
value only works with protoc-gen-go
, and gotoc
is trying to be agnostic to the generated language.
protoc
handles this by overloading the --go_out
flag. I'm not keen to follow that precedence. Maybe this should be a --params flag instead?
I see your point. It does seem odd that protoc specifies plugins in the output flag value. My original solution of having a "-grpc" flag also doesn't seem quite right because we may want to specify additional plugins in the future.
I like your idea of "-params" because it allows us to specify additional plugins in the future without adding additional flags. I updated the pull request to use "-params".
No rush on this. This is an API change of sorts. Hard to change later.
I kept looking at things in an overly-specific way. "-grpc", then "plugins=". Passing the raw parameters does seem like the best way to go. Thanks!
Updated the pull request.
Merged in 0071f33. Thanks!
This is needed to get protoc-gen-go to output grpc code.