rust-protobuf icon indicating copy to clipboard operation
rust-protobuf copied to clipboard

Proto files with the same name but different directory are overwritten

Open rob-brown opened this issue 4 years ago • 1 comments

By convention, our gRPC services are structured like this:

├── service 1
│   ├── message.proto
│   └── service.proto
├── service 2
│   ├── message.proto
│   └── service.proto
├── service 3
│   ├── message.proto
│   └── service.proto
├── service 4
│   ├── messages.proto
│   └── tensor.proto

Unfortunately, this library generates Rust files in a single directory and use the same name as the proto file. This ultimately means the services clobber each other's files.

I can see there's an old issue regarding adding hierarchal support to the code generation. This would solve our problem. Though based on its age I don't expect it to be added any time soon. Are there other solutions or work arounds to this?

rob-brown avatar Jan 11 '21 16:01 rob-brown

No there's no workaround. Sorry.

If someone wants to help, please do.

stepancheg avatar Feb 06 '21 01:02 stepancheg