build: generate root crate paths correctly (#623)
We shouldn't append `proto_path` (`super` by default) if the path starts with `crate::`. Fixes https://github.com/hyperium/tonic/issues/548
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
tonic_build::configure()
|
||||
.extern_path(".foo.bar.baz.Animal", "crate::Animal")
|
||||
.compile(&["foo.proto"], &["."])?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user