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've got two crates, one is a library and one is a tonic server. The library has a .proto that it builds with prost-build which I want to include in the server .proto, so I've specified them with .extern_path. When I build, I get this error (only relevant parts of backtrace included):
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error("expected identifier")', src\libcore\result.rs:1165:5
14: 0x7ff60ba70c68 - core::result::Result<syn::path::Path, syn::error::Error>::unwrap<syn::path::Path,syn::error::Error>
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14\src\libcore\result.rs:933
15: 0x7ff60ba678e5 - tonic_build::replace_wellknown
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\tonic-build-0.1.1\src\lib.rs:332
16: 0x7ff60ba8e63e - tonic_build::server::generate_streaming
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\tonic-build-0.1.1\src\server.rs:397
17: 0x7ff60ba81b1f - tonic_build::server::generate_methods
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\tonic-build-0.1.1\src\server.rs:228
18: 0x7ff60ba738df - tonic_build::server::generate
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\tonic-build-0.1.1\src\server.rs:8
19: 0x7ff60ba66ac6 - tonic_build::{{impl}}::generate
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\tonic-build-0.1.1\src\lib.rs:254
20: 0x7ff60bc9ae8a - prost_build::code_generator::{{impl}}::push_service::{{closure}}
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\prost-build-0.6.1\src\code_generator.rs:676
21: 0x7ff60bc78831 - core::option::Option<mut alloc::boxed::Box<ServiceGenerator>*>::map<mut alloc::boxed::Box<ServiceGenerator>*,(),closure-1>
at /rustc/73528e339aae0f17a15ffa49a8ac608f50c6cf14\src\libcore\option.rs:447
22: 0x7ff60bc9a246 - prost_build::code_generator::CodeGenerator::push_service
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\prost-build-0.6.1\src\code_generator.rs:673
23: 0x7ff60bc913b0 - prost_build::code_generator::CodeGenerator::generate
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\prost-build-0.6.1\src\code_generator.rs:103
24: 0x7ff60bc5bba0 - prost_build::Config::generate
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\prost-build-0.6.1\src\lib.rs:593
25: 0x7ff60ba2c000 - prost_build::Config::compile_protos<str*>
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\prost-build-0.6.1\src\lib.rs:552
26: 0x7ff60ba4eb61 - tonic_build::Builder::compile<str*>
at C:\Users\SWilcox\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\tonic-build-0.1.1\src\lib.rs:167
I see that the failure is coming from replace_wellknown. I used to have a reference to a well known type in the server .proto, but I removed it. This error doesn't go away after a clean build either.
The text was updated successfully, but these errors were encountered:
That's better practice anyways, so I'll go ahead and do that going forward, but the first case should either work out of the box or have a more descriptive error message.
Bug Report
Version
tonic = "0.1.1"
tonic-build = "0.1.1"
Platform
64-bit Windows 10
Crates
tonic-build
Description
I've got two crates, one is a library and one is a tonic server. The library has a .proto that it builds with prost-build which I want to include in the server .proto, so I've specified them with .extern_path. When I build, I get this error (only relevant parts of backtrace included):
My build.rs looks like this:
You can see in the commented section that I've tested this with prost_build, and that succeeds just fine.
Here's the server model_state.proto:
And the library obj_traits.proto:
I see that the failure is coming from replace_wellknown. I used to have a reference to a well known type in the server .proto, but I removed it. This error doesn't go away after a clean build either.
The text was updated successfully, but these errors were encountered: