I started building an app with protobuf 2.2.0 as it was the latest. Now I'm considering upgrading to protobuf 2.4.0a which is the latest. If I do so will the messages generated by one version of the app still be readable by the other version for the same schema? Or would I be breaking something?
Protocol buffers provide a language-neutral, platform-neutral, extensible mechanism for serializing structured data in a forward-compatible and backward-compatible way.
One of selling points of Protobuf was backward compatibility, i.e. developers can evolve format, and older clients can still use it. Now with new Protobuf version called proto3, the IDL language itself is not compatible as such things as options , required where dropped, new syntax for enuns, no extention.
Moving existing fields into a oneof is a backward incompatible change, unless it is a new oneof with a single field.
The same construct in proto2 and proto3 will have the same binary representation. If your proto only uses features available in both proto2 and proto3, systems built with proto2 should be able to communicate with systems built with proto3 without any problem (it's also true vice versa).
That should be fine. Version 2.1.0 introduced packed repeated fields, but I don't believe there have been any wire format changes since then.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With