Skip to content

Compatibility issue with prost 0.12? #110

@brocaar

Description

@brocaar

I'm using pbjson 0.5.1 and I had no issues while using prost 0.11. While trying to upgrade prost to 0.12.0 which was released last week, I'm getting lots of errors:

error[E0277]: the trait bound `pbjson_types::Struct: prost::Message` is not satisfied
     |
282  | #[derive(Clone, PartialEq, ::prost::Message)]
     |                            ^^^^^^^^^^^^^^^^ the trait `prost::Message` is not implemented for `pbjson_types::Struct`
     |
     = help: the following other types implement trait `prost::Message`:
               bool
               i32
               i64
               u32
               u64
               f32
               f64
               prost_types::compiler::Version
             and 339 others
note: required by a bound in `message::encoded_len`
    --> /home/brocaar/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-0.12.0/src/encoding.rs:1121:12
     |
1119 |     pub fn encoded_len<M>(tag: u32, msg: &M) -> usize
     |            ----------- required by a bound in this function
1120 |     where
1121 |         M: Message,
     |            ^^^^^^^ required by this bound in `encoded_len`
     = note: this error originates in the derive macro `::prost::Message` (in Nightly builds, run with -Z macro-backtrace for more info)

Is this a known issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions