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
I tried to add reflection to my gRPC server using tonic-reflection. I do not use tonic-build, but rather precompile proto files with protoc plugins, separately.
But tonic-reflection uses include_proto which seems to be using protoc under the hood.
This means that in order to use this package there needs to be protoc installed.
It's a problem for CI/CD pipelines, building a docker image, etc... All these now need to first install the protoc dependency.
Proposal
Since include_proto is used for a single static file, it seems to me that it would be great to "pre compile" it instead?
Alternatives
tonic-reflection could be used as an optional dependency.
protoc could be installed in all contexts.
The text was updated successfully, but these errors were encountered:
Completely agree that protoc should be an optional dependency for tonic in general. For example grpc-go does not rely directly on protoc. If it is needed for testing etc it feels these can be gated by feature flags. I have never contributed to the repo but if we are open to the change I would be interested in trying to help.
If by pre compile you commit the generated code and make it so end users of the library don't need to have a protoc in their path. Then yes we can make that change in line with how tonic-health does it. You can follow this PR #1065 as an example. TL;DR: We create a test that does the build generation that will check that the proto code is up to date with what is committed so when we publish you don't need to build anything. I believe this should solve your problem.
Feature Request
Crates
tonic-reflection
Motivation
I tried to add reflection to my gRPC server using
tonic-reflection
. I do not usetonic-build
, but rather precompile proto files with protoc plugins, separately.But tonic-reflection uses
include_proto
which seems to be usingprotoc
under the hood.This means that in order to use this package there needs to be protoc installed.
It's a problem for CI/CD pipelines, building a docker image, etc... All these now need to first install the protoc dependency.
Proposal
Since
include_proto
is used for a single static file, it seems to me that it would be great to "pre compile" it instead?Alternatives
tonic-reflection
could be used as an optional dependency.protoc
could be installed in all contexts.The text was updated successfully, but these errors were encountered: