Skip to content

Conversation

@jrconlin
Copy link
Member

@jrconlin jrconlin commented Aug 6, 2022

So... Yeah.

Protobuf-3.

This compiles with Protobuf-3 but holy cow are there breaking changes. (So many breaking changes.)
Granted, the changes are good, and they do make things a lot more Rust-y, but wow, just so, so many breaking changes.

e.g. You now no longer need to create a mutable version of some structure like PubsubMessage and then call getter/setter functions. You can instead use

PubsubMessage{
    data: message.to_owned().into_bytes(),
    publish_time: protobuf::MessageField(
        Some(Box::new(
            protobuf::well_know_types::timestamp::Timestamp{
                seconds: some_timestamp
            }))
       ),
   ..Default::default()
}

Neat, huh? Yep. (So many breaking changes.)

You can also replace instances of RepeatingField() with vec![]

(quietly sobs about how many changes that's going to require.)

Looks like Protobuf 3 is not compatible with protobuf 2. yay.
@jrconlin jrconlin marked this pull request as ready for review March 27, 2024 22:51
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

Successfully merging this pull request may close these issues.

2 participants