-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
grpc: plugin flag for generate server-only or client-only #373
Comments
\cc @dfawley. Inside Google, I believe is a movement to provide finer granularity control over what stubs are general. |
I have not heard of any such movement yet. What is the significance of this request? IIUC the only difference is that slightly fewer methods would be in the generated file, which would have a negligible effect on binary size. |
Ping for @adam-26 since I forgot to at-mention earlier. |
@dfawley, the issue was raised to allow for client code to be generated and distributed as part of an SDK without needing to include the server code. Nice to have, but not a blocking issue. |
I'm going to go ahead and say we're unlikely to add this to the upcoming release. As @dfawley notes changes here would likely have a negligible effect on binary size or performance. It seems that as a work around, the distributed SDK that @adam-26 mentioned can manually (or automatically) remove related server code from their generated proto package for the purpose of distributing a client-only implementation. It's not clear if this is overall useful for the grpc proto plugin. Please re-open if you think there's more utility to this than meets the eye (or at least my eyes). |
From the C# plugin:
Not only pollution, but also potentially confusing to user.
That's what we are doing now. Yet, it would be nice if the server related code could be omitted with a flag in the first place. |
Can some flags be added to the
grpc_go
plugin to allow only the required code to be generated? As done in the C# plugin.The text was updated successfully, but these errors were encountered: