-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tonic 0.1.1 produces code which does not compile. #249
Comments
Hi @tkaitchuck, make sure you have the correct version of prost. For tonic 0.1.1 it should be 0.6. Also, if you just upgraded tonic, also upgrade tonic-build and generate your protos again. |
This fixed the problem. Feel free to close. |
Yes. This is because generated structs derive prost::Message, and it needs to be available directly on your project. /// EchoRequest is the request for echo.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EchoRequest {
#[prost(string, tag = "1")]
pub message: std::string::String,
} |
Yup, this is due to prost's macros requiring it at the root level nothing we can really do about this unfortunately. |
Bug Report
When building with tonic 0.1.1 many compile errors of the following from appear:
Version
0.1.1
Noticeably this does not happen with tonic 0.1.0-beta.1
Platform
Linux workdesktop 4.15.0-72-generic #81-Ubuntu SMP Tue Nov 26 12:20:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Crates
An unreleased crate. However the proto that is causing the problem is here:
https://github.com/pravega/pravega/blob/master/shared/controller-api/src/main/proto/Controller.proto
Description
The code to pull in the proto is:
Running this with tonic 0.1.0-beta.1 there were no issues, with 0.1.1 it does not compile.
The text was updated successfully, but these errors were encountered: