Feature #2482

Update Protobuf to 2.6.1

Added by T. Korthals over 8 years ago. Updated over 8 years ago.

Status:ClosedStart date:12/17/2015
Priority:NormalDue date:
Assignee:-% Done:


Category:Build SystemEstimated time:2.00 hours
Target version:Robotics Service Bus - rsb-0.13


The major benefits are as follows:

  • Added oneofs(unions) feature. Fields in the same oneof will share
    memory and at most one field can be set at the same time. Use the
    oneof keyword to define a oneof like:
    message SampleMessage {
    oneof test_oneof {
    string name = 4;
    YourMessage sub_message = 9;
  • Files, services, enums, messages, methods and enum values can be marked
    as deprecated now.
  • Added Support for list values, including lists of mesages, when
    parsing text-formatted protos in C++ and Java.
    For example: foo: [1, 2, 3]
  • Enhanced customization on TestFormat printing.
  • Added SwapFields() in reflection API to swap a subset of fields.
    Added SetAllocatedMessage() in reflection API.
  • Repeated primitive extensions are now packable. The
    [packed=true] option only affects serializers. Therefore, it is
    possible to switch a repeated extension field to packed format
    without breaking backwards-compatibility.
  • Various speed optimizations.
  • writeTo() method in ByteString can now write a substring to an
    output stream. Added endWith() method for ByteString.
  • ByteString and ByteBuffer are now supported in CodedInputStream
    and CodedOutputStream.
  • java_generate_equals_and_hash can now be used with the LITE_RUNTIME.
  • A new C++-backed extension module (aka "cpp api v2") that replaces the
    old ("cpp api v1") one. Much faster than the pure Python code. This one
    resolves many bugs and is recommended for general use over the
    pure Python when possible.
  • Descriptors now have enum_types_by_name and extension_types_by_name dict
  • Support for Python 3.


#1 Updated by J. Wienke over 8 years ago

  • Status changed from New to Closed
  • Assignee deleted (Anonymous)

You are free to use 2.6 if it is installed as the library dependency. CMake just needs to be instructed to use that version. We will however not make this a requirement as long as trusty is used since RSX should be able to work with system packages.

#2 Updated by J. Moringen over 8 years ago

Please note that not all of the new features are supported by our pipeline and tools. However, using the current feature set but the new library version should not be a problem.

#3 Updated by T. Korthals over 8 years ago

Our intention was the usage of the "oneof" keyword to reduce the overhead for our embedded AMiRo platform.
We'll give it try and test the downward compatibility as well.

#4 Updated by J. Wienke over 8 years ago

These new keywords will very likely not work with older versions of protobuf. You can use them in your own RST copy, but we cannot merge them back atm.

#5 Updated by T. Korthals over 8 years ago

You are absolutely right. But I assume/hope, that the common RST library will work with both versions.

#6 Updated by J. Wienke over 8 years ago

Shouldn't be a problem as long as protobuf is backwards compatible.

Also available in: Atom PDF