Skip to content

[Bug] Build fails with Protobuf 30 from type changes #478

Open
@cho-m

Description

@cho-m

Search before asking

  • I searched in the issues and found nothing similar.

Version

OS: macOS 15
Client: v3.7.0

Minimal reproduce step

Should be reproducible with any build attempt using Protobuf 30.0 (C++ 6.30.0) or later, at least when Abseil was built to use std::string_view.

However, won't be able to use Vcpkg build yet as they only have Protobuf 29.3 (C++ 5.29.3).

What did you expect to see?

Successful build

What did you see instead?

lib/ProtobufNativeSchema.cc:42:23: error: no viable conversion from 'internal::DescriptorStringView' (aka 'basic_string_view<char>') to 'const std::string' (aka 'const basic_string<char>')
   42 |     const std::string rootMessageTypeName = descriptor->full_name();
      |                       ^                     ~~~~~~~~~~~~~~~~~~~~~~~

Anything else?

Caused by breaking change in protocolbuffers/protobuf@d1990d9

Should be possible to use explicit constructor for std::string instead and work for both Protobuf 30 and older compatibility. I think move constructor/assignment should avoid unnecessary copies for older Protobuf.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

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