Skip to content
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

proto file "does not reside in any import path" #108

Closed
horacimacias opened this issue Jul 1, 2019 · 6 comments · Fixed by jhump/protoreflect#226 or #109
Closed

proto file "does not reside in any import path" #108

horacimacias opened this issue Jul 1, 2019 · 6 comments · Fixed by jhump/protoreflect#226 or #109

Comments

@horacimacias
Copy link

horacimacias commented Jul 1, 2019

I've been happily using grpcurl with something like the following:

grpcurl -plaintext -import-path ../../filter/api/services -proto myservice.proto localhost:50055 myservice.MyService/MyRPC

and it's been working fine for me.
Today a colleague reported issues running this same line.
After comparing versions of grpcurl, turnw out I was using:
grpcurl dev build <no version set>
and he was using:
grpcurl 1.3.0

So I brew install grpcurl to get on the same official version and now grpcurl complains:

Failed to process proto source files.: my_current_absolute_path/myservice.proto does not reside in any import path

This is failing:

grpcurl -plaintext -import-path ../../filter/api/services -proto myservice.proto localhost:50055 myservice.MyService/MyRPC

but this is working:

grpcurl -plaintext -proto ../../filter/api/services/myservice.proto localhost:50055 myservice.MyService/MyRPC

is there anything I'm doing wrong?
has anything changed around this area that would explain why previous version worked fine but current does not?

@jhump
Copy link
Contributor

jhump commented Jul 1, 2019

This was certainly introduced by this change.

It was changed in the hopes of behaving more like protoc, so that an invocation of proto include paths and source files that works with protoc would also work with grpcurl. But protoc behaves correctly/intuitively for this particular case and grpcurl fails. So this is definitely a bug.

@horacimacias
Copy link
Author

thanks for the fast response.

I see the fix/change is in protoreflect but no changes apparently in grpcurl; is there a new version planned for grpc or how can I get the latest to test this?
I just tried go get/install-ing this again after deleting old files but it seems to be pulling the same grpcurl files

@jhump
Copy link
Contributor

jhump commented Jul 3, 2019

Sorry - I didn't mean to close this issue. Github did that automatically due to my comment in the protoreflect PR.

I still need to build a release of protoreflect and then update grpcurl to use that new release. (I'll then also need a new release of grpcurl.)

If you want to try it out before I get everything release, you'd have to do so w/out Go modules, so that you can just go get -u github.com/jhump/protoreflect and let the grpcurl build use that. (If you are using Go modules, the grpcurl build will always use the version pinned in its go.mod file. To make that work, you'd have to hack up its go.mod a bit...)

@jhump jhump reopened this Jul 3, 2019
@jhump jhump closed this as completed in #109 Jul 3, 2019
@iamatulsingh
Copy link

I tried grpcurl 1.8.7 and grpcurl dev build <no version set> and it still throwing this error. Any solution yet?

@jhump
Copy link
Contributor

jhump commented Dec 7, 2022

@iamatulsingh, a fix was released three years ago. If you are seeing this error message, it is likely due to misuse of the -proto and -import-path flags. Please open a new issue with more details of what you are doing, including the command-line flags you are using and the directory layout of sources you are trying to use.

@iamatulsingh
Copy link

I'll open new issue regarding this. Thank you @jhump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants