GH-45807: [C++] compatibility patches for protobuf 30#45805
GH-45807: [C++] compatibility patches for protobuf 30#45805christian-heusel wants to merge 1 commit intoapache:mainfrom
Conversation
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or See also: |
f8fbc5c to
6e87552
Compare
6e87552 to
9ac71b6
Compare
|
Thanks for the contribution, this is not a minor PR though. I will create and link an issue for you! |
|
|
|
Could you apply this diff to fix the format: https://github.com/apache/arrow/actions/runs/13872657236/job/38822487820?pr=45805#step:6:33 |
6a06ed1 to
eff85c8
Compare
|
Thanks for creating the issue, I have added the reference to it in the latest version of the commit an applied the formatting changes 🤗 Edit: Argh, created a whitespace issue with my editor, now applied it with |
This version of protobuf has switched a few interface types from `std::string` to `std::string_view` and therefore introcuces some breaking changes in the code. Fix these by applying appropriate casts. Link: https://protobuf.dev/support/migration/#v30 Signed-off-by: Christian Heusel <christian@heusel.eu>
eff85c8 to
6994dac
Compare
|
@github-actions crossbow submit -g cpp |
|
Revision: 6994dac Submitted crossbow builds: ursacomputing/crossbow @ actions-4471dd3b4d |
| ARROW_RETURN_NOT_OK( | ||
| ParseFromBufferImpl(buf, Message::descriptor()->full_name(), &message)); | ||
| ARROW_RETURN_NOT_OK(ParseFromBufferImpl( | ||
| buf, std::string(Message::descriptor()->full_name()), &message)); |
There was a problem hiding this comment.
Instead we can change the ParseFromBufferImpl signature to take a string_view
|
e635e05 #46134 / #46136 is an identical patch (I tried to rebase this onto main and got): |
|
Closing as superseded by #46136 |
Rationale for this change
The current version of arrow is not compatible with protobuf 30.0 and beyond, which we are currently rolling out in Arch Linux:
https://archlinux.org/todo/protobuf-300/
What changes are included in this PR?
In order to migrate to the new APIs based on
std::string_viewwe just use a few casts tostd::string.Are these changes tested?
Compile tested only, but there are no problems expected.