You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with hundreds of .proto files, so it's not practical for me to manually set up a module hierarchy to mirror the protobuf package hierarchy.
Some of these .proto files have the same name as others. So even if I did something in my build.rs like suggested here #324 (comment) then I'd still run into trouble with the output.
What I'd really like is an option in protobuf-codegen-pure (controlled via Customize) to automatically generate a directory hierarchy and Rust module hierarchy to match the protobuf package hierarchy. If you're open to the idea, I could take a swing at implementing this.
The text was updated successfully, but these errors were encountered:
I'm inclined to implement C++/Java style, where foo/bar/baz.proto is generated to foo/bar/baz.rs. This is easier to implement, but also it solves several hard questions, like for example, how to generate code when multiple files declare the same package.
Curious if this is now available in master -- It seems the src code of 2.18.1 and master differ quite a bit now.
Context -- I'm also working with hundreds of .proto files and I tried to manually mapping individual files into their respective paths with 2.18.1. It wasn't fully successful since it messes up the relative paths (eg ::super::).
Another issue I had to work around was having both foo.proto and foo subdirectory container more proto files, since the generated foo.rs and foo sub module would confuse Rust. Just surfacing that in case this has not been considered.
I'm working with hundreds of
.proto
files, so it's not practical for me to manually set up a module hierarchy to mirror the protobuf package hierarchy.Some of these
.proto
files have the same name as others. So even if I did something in mybuild.rs
like suggested here #324 (comment) then I'd still run into trouble with the output.What I'd really like is an option in
protobuf-codegen-pure
(controlled viaCustomize
) to automatically generate a directory hierarchy and Rust module hierarchy to match the protobuf package hierarchy. If you're open to the idea, I could take a swing at implementing this.The text was updated successfully, but these errors were encountered: