into the Cargo.toml of a project (including grpc_examples, as included by this repo), the protoc compiler generates broken Rust definitions:
error[E0433]: failed to resolve. Could not find `ServerMethod` in `server`
--> src/helloworld_grpc.rs:99:17
|
99 | ::grpc::server::ServerMethod::new(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `ServerMethod` in `server`
error[E0433]: failed to resolve. Could not find `MethodHandlerUnary` in `server`
--> src/helloworld_grpc.rs:108:25
|
108 | ::grpc::server::MethodHandlerUnary::new(move |o, p| handler_copy.say_hello(o, p))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `MethodHandlerUnary` in `server`
[...]
Using the protoc-rust-grpc crate from the current git head instead of 0.2.0 from crates.io works perfectly, without any issue.
The main difference I can see between the two different version is the usage of ::grpc::server (in the code generated by the crates.io release) instead of ::grpc::rt (in the code generated by the crate from git). The second version compiles flawlessly, and everthing works.
v0.2.0 had incorrectly specified internal dependency (protoc-rust-grpc depended on grpc-compiler=0.1.10). I've pushed v0.2.1 that should be OK. Thank you for the report!
If I set
into the Cargo.toml of a project (including grpc_examples, as included by this repo), the protoc compiler generates broken Rust definitions:
Using the protoc-rust-grpc crate from the current git head instead of 0.2.0 from crates.io works perfectly, without any issue.
The main difference I can see between the two different version is the usage of
::grpc::server
(in the code generated by the crates.io release) instead of::grpc::rt
(in the code generated by the crate from git). The second version compiles flawlessly, and everthing works.