-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-35497: [C++] Use the latest tagged version of flatbuffers #38192
Conversation
I used this hacky script to do it. #!/bin/sh SRC="${FLATBUFFERS_REPO}/include/flatbuffers" DEST="${ARROW_REPO}/cpp/thirdparty/flatbuffers/include/flatbuffers/" cp "${SRC}/allocator.h" "${DEST}" cp "${SRC}/array.h" "${DEST}" cp "${SRC}/base.h" "${DEST}" cp "${SRC}/buffer.h" "${DEST}" cp "${SRC}/buffer_ref.h" "${DEST}" cp "${SRC}/default_allocator.h" "${DEST}" cp "${SRC}/detached_buffer.h" "${DEST}" cp "${SRC}/flatbuffer_builder.h" "${DEST}" cp "${SRC}/flatbuffers.h" "${DEST}" cp "${SRC}/stl_emulation.h" "${DEST}" cp "${SRC}/string.h" "${DEST}" cp "${SRC}/struct.h" "${DEST}" cp "${SRC}/table.h" "${DEST}" cp "${SRC}/vector.h" "${DEST}" cp "${SRC}/vector_downward.h" "${DEST}" cp "${SRC}/verifier.h" "${DEST}"
|
||
// Move this vendored copy of flatbuffers to a private namespace, | ||
// but continue to access it through the "flatbuffers" alias. | ||
namespace arrow_vendored_private { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we switch to C++17-style arrow_vendored_private::flatbuffers
it probably reduces the patch size and may make automation more doable as well.
cpp/thirdparty/flatbuffers/README.md
Outdated
- #endif | ||
- #endif | ||
- #endif // __has_include | ||
+ #include <string_view> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change actually necessary or would the original "Check for std::string_view (in c++17)" snippet above work for us? We probably want to minimize the patch size.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Since this version doesn't check for absl::string_view
first, we don't need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference: #12204
@github-actions crossbow submit -g cpp -g python |
Revision: b019254 Submitted crossbow builds: ursacomputing/crossbow @ actions-2c6d2bba81 |
CI failures look unrelated, I'll merge. Thanks @felipecrv ! |
…pache#38192) ### Rationale for this change To use a more modern version of `flatc` in Arrow. ### What changes are included in this PR? 1) Re-generating the the C++ files with a `flatc` based on the latest tag on the `flatbuffer` repo. 2) Copy the minimal set of includes to our vendored folder 3) Manually re-apply the patches that have been applied to the previous headers to fix issues ### Are these changes tested? Tested by building everything correctly. * Closes: apache#35497 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 01b42d5. There were 3 benchmark results indicating a performance regression:
The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them. |
@github-actions crossbow submit test-skyhook-integration |
Revision: b019254 Submitted crossbow builds: ursacomputing/crossbow @ actions-2eb8774cee
|
@felipecrv It seems that this broke https://github.com/ursacomputing/crossbow/actions/runs/6502407264/job/17661381250#step:6:2369
Could you re-generate |
Sure. Let me create an issue and submit a PR soon. |
…pache#38192) ### Rationale for this change To use a more modern version of `flatc` in Arrow. ### What changes are included in this PR? 1) Re-generating the the C++ files with a `flatc` based on the latest tag on the `flatbuffer` repo. 2) Copy the minimal set of includes to our vendored folder 3) Manually re-apply the patches that have been applied to the previous headers to fix issues ### Are these changes tested? Tested by building everything correctly. * Closes: apache#35497 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
…pache#38192) ### Rationale for this change To use a more modern version of `flatc` in Arrow. ### What changes are included in this PR? 1) Re-generating the the C++ files with a `flatc` based on the latest tag on the `flatbuffer` repo. 2) Copy the minimal set of includes to our vendored folder 3) Manually re-apply the patches that have been applied to the previous headers to fix issues ### Are these changes tested? Tested by building everything correctly. * Closes: apache#35497 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
…pache#38192) ### Rationale for this change To use a more modern version of `flatc` in Arrow. ### What changes are included in this PR? 1) Re-generating the the C++ files with a `flatc` based on the latest tag on the `flatbuffer` repo. 2) Copy the minimal set of includes to our vendored folder 3) Manually re-apply the patches that have been applied to the previous headers to fix issues ### Are these changes tested? Tested by building everything correctly. * Closes: apache#35497 Authored-by: Felipe Oliveira Carvalho <felipekde@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
Rationale for this change
To use a more modern version of
flatc
in Arrow.What changes are included in this PR?
flatc
based on the latest tag on theflatbuffer
repo.Are these changes tested?
Tested by building everything correctly.