I have grpc server that complied and run ok until I updated tonic to the latest version. Now it fails to build
Compiling tonic v0.9.1
error: couldn't read /Users/bihaber/crypto_service/target/debug/build/crypto_service-f8fe7ed5e86191b1/out/crypto.rs: No such file or directory (os error 2)
--> src/lib.rs:3:5
|
3 | tonic::include_proto!("crypto");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in the macro `include` which comes from the expansion of the macro `tonic::include_proto` (in Nightly builds, run with -Z macro-backtrace for more info)
How can I figure out what is going on in he macro? where is -Z defined?
Try the docs. Probably the issue is the one in the Note.
The note about -Z is talking about a rustc flag that you could use on nightly (e.g. RUSTFLAGS='-Z macro-backtrace' cargo build ...) to give more detailed, macro-related diagnostics. It can be useful when the macro is generating wonky code. Based on the error, I don't think anything like that is going on in this case; it's just looking for a file that doesn't exist.