Skip to content
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

simple example program won't compile with client-rust as a dependency #156

Closed
pgray opened this issue Jul 13, 2020 · 3 comments
Closed

simple example program won't compile with client-rust as a dependency #156

pgray opened this issue Jul 13, 2020 · 3 comments

Comments

@pgray
Copy link

pgray commented Jul 13, 2020

It seems the usage of kvproto isn't correct right now in master.
Not sure if something needs to be updated.

I'm seeing cargo check spew:

error[E0277]: the trait bound `raft_proto::prelude::Message: prost::Message` is not satisfied                                                                      [166/392]
   --> /home/pgray/dip/target/debug/build/kvproto-2cedd5e738cd6dfb/out/protos/raft_serverpb.rs:1:28                                                                         
    |                                                                                                                                                                       
1   | #[derive(Clone, PartialEq, ::prost::Message)]                                                                                                                         
    |                            ^^^^^^^^^^^^^^^^ the trait `prost::Message` is not implemented for `raft_proto::prelude::Message`                                          
    |                                                                                                                                                                       
   ::: /home/pgray/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.6.1/src/encoding.rs:914:12                                                                       
    |                                                                                                                                                                       
914 |         M: Message,                                                                                                                                                   
    |            ------- required by this bound in `prost::encoding::message::encode`                                                                                       
    |                                                                                                                                                                       
    = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)                                                          
                                                                                                                                                                            
error[E0277]: the trait bound `raft_proto::prelude::Message: prost::Message` is not satisfied                                                                               
   --> /home/pgray/dip/target/debug/build/kvproto-2cedd5e738cd6dfb/out/protos/raft_serverpb.rs:1:28                                                                         
    |                                                                                 
1   | #[derive(Clone, PartialEq, ::prost::Message)]                                   
    |                            ^^^^^^^^^^^^^^^^ the trait `prost::Message` is not implemented for `raft_proto::prelude::Message`
    |                                                                                 
   ::: /home/pgray/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.6.1/src/encoding.rs:929:12                                                                       
    |                                                                                 
929 |         M: Message,                                                             
    |            ------- required by this bound in `prost::encoding::message::merge`                                                                                        
    |                                                                                 
    = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)                                                          

error[E0277]: the trait bound `raft_proto::prelude::Message: prost::Message` is not satisfied                                                                               
   --> /home/pgray/dip/target/debug/build/kvproto-2cedd5e738cd6dfb/out/protos/raft_serverpb.rs:1:28                                                                         
    |                                                                                 
1   | #[derive(Clone, PartialEq, ::prost::Message)]                                   
    |                            ^^^^^^^^^^^^^^^^ the trait `prost::Message` is not implemented for `raft_proto::prelude::Message`
    |                                                                                 
   ::: /home/pgray/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.6.1/src/encoding.rs:975:12                                                                       
    |                                                                                 
975 |         M: Message,                                                             
    |            ------- required by this bound in `prost::encoding::message::encoded_len`                                                                                  
    |                                                                                 
    = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)                                                          

error[E0277]: the trait bound `raft_proto::prelude::HardState: prost::Message` is not satisfied                                                                             
   --> /home/pgray/dip/target/debug/build/kvproto-2cedd5e738cd6dfb/out/protos/raft_serverpb.rs:85:28                                                                        
    |                                                                                 
85  | #[derive(Clone, PartialEq, ::prost::Message)]                                   
    |                            ^^^^^^^^^^^^^^^^ the trait `prost::Message` is not implemented for `raft_proto::prelude::HardState`
    |                                                                                 
   ::: /home/pgray/.cargo/registry/src/github.com-1ecc6299db9ec823/prost-0.6.1/src/encoding.rs:914:12                                                                       
    |                                                                                 
914 |         M: Message,                                                             
    |            ------- required by this bound in `prost::encoding::message::encode`                                                                                       
    |                                                                                 
    = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)                                                          

error[E0277]: the trait bound `raft_proto::prelude::HardState: prost::Message` is not satisfied
...

My env:

pgray@xx:dip (master)*$ go version
go version go1.14.4 linux/amd64
pgray@xx:dip (master)*$ protoc --version
libprotoc 3.8.0
@ekexium
Copy link
Collaborator

ekexium commented Jul 13, 2020

#142 gives a workaround for this.

@pgray
Copy link
Author

pgray commented Jul 13, 2020

Ah thanks!

@ekexium
Copy link
Collaborator

ekexium commented Nov 2, 2020

Fixed.

@nrc nrc closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants