When I'm using tonic_build with slight complex structure, the code generator display weird errors
Bug Report
When I'm using tonic_build with slight complex structure, the code generator display weird errors
Version
└── tonic v0.8.0 └── tonic-build v0.8.0
Platform
21.5.0 Darwin Kernel Version 21.5.0
Description
In my proto folder I have different type of subfolder each one containing multiple proto files with the same namespace. Now I want to import some of them into other and compile everything with tonic_build but I get weird errors. I created a PoC for the error, and the link to the GitHub repository is the following one: https://github.com/fbrv/failing-example-tonic
@fbrv You need to include prost-types = "0.11" as a dependency for your project (in Cargo.toml).
Or you can add .compile_well_known_types(true) to your tonic_build::Builder.
I don't see the need for prost-typesmentioned in the top level tonic docs anywhere, although it is in the prost docs and README: https://github.com/tokio-rs/prost#using-prost-in-a-cargo-project
There is also a crate called tonic-types, but I don't know what that does. (-:
Yeah, we could provide some better docs around this for sure.
Yeah, better docs would be great :wink:
On my Fedora 36 box this fixed the issue for me: sudo dnf install protobuf protobuf-compiler protobuf-devel
I would accept PRs fixing docs 😄