Protoman icon indicating copy to clipboard operation
Protoman copied to clipboard

Folder-level import

Open spluxx opened this issue 5 years ago • 0 comments

Suggested by @DoneSpeak #13

In some projects, the protobuf files are separated into various folders - an example project structure would be

-- service1
     |- service1.proto (imports models)
-- service2
     |- service2.proto (imports models / service1)
-- core
     |- models.proto
-- 

Although the proto_path feature introduced in v0.3.2 makes it possible to build these files together, an easy way to import all .proto files in a folder is yet to be delivered.

My take on this problem is to allow selection of the root directory, which

  1. sets the proto_path to the selected path and
  2. adds all .proto files under it

It might even make sense to enforce this to be the only way to import the .proto files, and make the proto_path implicit rather than having the users pick the files one by one and type the proto_path in. But I'll have to dig into the protoc docs and make sure this doesn't block certain project structures.

spluxx avatar Apr 24 '20 04:04 spluxx