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

All protos in one folder - "-I" doesnt seem to work - generation fails due to import fails #484

Open
bradparks opened this issue Apr 1, 2022 · 0 comments

Comments

@bradparks
Copy link

bradparks commented Apr 1, 2022

I have all my proto files in a single folder. Some of protos import another proto, but I can't get the "-I" option to find the protos, no matter what I pass. I'm on a mac. I've tried "." and an absolute path, neither seem to work.

# go to the folder that has all my protos
$ cd ~/project/mycompany/stuff/superservice/v1/

# show the imports
$ grep -r import *
test_access.proto:import "mycompany/stuff/superservice/v1/customer_state.proto";
get_info.proto:import "mycompany/stuff/superservice/v1/customer_state.proto";

$ ls 
get_info.proto
test_access.proto
tenant_state_enum.proto

# try and run it
$ P="$HOME/git/project"
$ docker run --rm \
    -v $(pwd)/doc:/out \
    -v $(pwd)/.:/protos \
    pseudomuto/protoc-gen-doc \
    -I "$P"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant