I need to fix a grpc service, so I want to understand the logic around compiling them.
In the example below, I don't understand why protoc doesn't compile the address.proto, since it's imported by person.proto.
There are no build errors, so I don't think it's an import/naming issue. Unfortunately, only a person_pb2.py is generated...
// file: address.proto
syntax="proto3";
message Address {
string city = 1;
string road = 3;
int32 roadNumber = 4;
}
// file: person.proto
syntax="proto3";
import "address.proto";
message Person {
string name = 1;
Address home = 3;
Address work = 4;
}
build command:
python -m grpc_tools.protoc --proto_path ../protos --python_out=. person.proto