-
Notifications
You must be signed in to change notification settings - Fork 5
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
Document content_roots
for prefix removal
#138
Comments
If I'm not mistaken, that's what content_roots are for. Unfortunately, they seem to be undocumented. |
Thanks. Seemed like it should work, but in the following example the grpc health protos are missing from the tree, but otherwise it looks like it stripped the prefix of just envoy protos:
It's difficult to try different variations due to #27 without creating minimal sample repos -- I can't just delete the source tree. |
Perhaps my use case is not supported as I don't have "any protos of my own"? Lines 140 to 142 in bf7ebd8
Use case is building a server that provides two services, the grpc health protocol for status checks, and a sidecar for Envoy. I could specify my dependency roots from files, but realistically I'd just need to list fully qualified gRPC service names. |
This works good enough for now even though it fetches more than I need, but I think this prefix on its own is just a documentation issue as mentioned above in #138 (comment):
|
content_roots
for prefix removal
Perhaps it is just a configuration mistake, but I suspect
protofetch
works on the assumption that protos are stored at the root of a git repository. I'm usingproto_out_dir = "protos"
with the following dependency:Instead of finding a file at
protos/grpc/health/v1/health.proto
, it is actually atprotos/src/proto/grpc/health/v1/health.proto
. I assumed maybeprotofetch
had the logic to automatically strip prefixes based on the proto package name.I tried using
url = "github.com/grpc/grpc/src/proto"
as a configuration option to see if something like that was undocumented, but instead I get this error:If one wants to compile multiple unrelated proto dependency trees at once, I believe they need to be rooted in the same directory? Is there a way I am currently supposed to use
protofetch
so all my dependencies could end up in the same logical & physical directory tree?For example adding this to my config:
Fetching it (155 MB cached, 53 seconds):
The
QuicProtocolOptions
message is inprotos/api/envoy/api/v2/listener/quic_config.proto
notprotos/envoy/api/v2/listener/quic_config.proto
.The text was updated successfully, but these errors were encountered: