Skip to content

Support Protobuf 30+ (Protobuf C++ 6.x) #1522

@cho-m

Description

@cho-m

With Protobuf C++ 5.x (Protobuf 26 - 29) end of support on 31 Mar 20261, it would be nice to update to Protobuf C++ 6.x (Protobuf 30 - 33).

protobuf-javascript already added support in protocolbuffers/protobuf-javascript@eb785a9 which can be used as reference.

The main incompatibility is from various APIs now returning an absl::string_view rather than std::string. For this particular change:

  • The naive/quick fix is to just find-replace everything impacted and wrap with std::string(...).
  • A more performant option is to directly use the string_view and functions provided by Abseil - https://abseil.io/docs/cpp/guides/strings

Footnotes

  1. https://protobuf.dev/support/version-support/#cpp

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