Closed
Description
🐛 Bug Report
I would like to execute protoc
with protoc-gen-grpc-gateway
to generate stubs for all my packages in one go. Unfortunately, I am getting an error: --grpc-gateway_out: inconsistent package names: av1 bv1
.
To Reproduce
- Organize the packages like this:
proto
└── my-org
├── a
│ └── v1
│ └── a.proto
└── b
└── v1
└── b.proto
where a.proto
's package is av1
and b.proto
's package name is bv1
.
- Execute
protoc
in the following way:
protoc \
-I=/proto \
-I=/third_party \
--go_opt=paths=source_relative \
--go_out=/gen \
--go-grpc_opt=paths=source_relative \
--go-grpc_out=/gen \
--grpc-gateway_out=paths=source_relative,logtostderr=true:/gen \
--validate_out=paths=source_relative,lang=go:/gen \
$(find /proto -name '*.proto')
Expected behavior
I expect to have grpc-gateway stubs generated in corresponding directories.
Actual Behavior
I am getting an error --grpc-gateway_out: inconsistent package names: av1 bv1
. However, when executing the protoc
command package-by-package, it seems that the stubs are generated properly in the corresponding directories in accordance with paths=source_relative
.
Your Environment
I execute this in a Docker container. It uses golang:1.14-stretch
as a base image.
The version of protoc-gen-grpc-gateway
is v1.14.7
.