-
Notifications
You must be signed in to change notification settings - Fork 1.1k
regenerate arrow-ipc/src/gen with patched flatbuffers #6426
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
Changes from all commits
df868b4
d850dec
7fa795c
de03d26
e1378c9
7121201
a5803fb
1dd6c28
c0c9ea8
d454ae0
ac8b01c
a2c11ba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ arrow-array = { workspace = true } | |
| arrow-buffer = { workspace = true } | ||
| arrow-data = { workspace = true } | ||
| arrow-schema = { workspace = true } | ||
| flatbuffers = { version = "24.3.25", default-features = false } | ||
| flatbuffers = { version = "24.12.23", default-features = false } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎉 |
||
| lz4_flex = { version = "0.11", default-features = false, features = ["std", "frame"], optional = true } | ||
| zstd = { version = "0.13.0", default-features = false, optional = true } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -21,33 +21,36 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |||||
| # Change to the toplevel `arrow-rs` directory | ||||||
| pushd $DIR/../ | ||||||
|
|
||||||
| echo "Build flatc from source ..." | ||||||
|
|
||||||
| FB_URL="https://github.com/google/flatbuffers" | ||||||
| FB_DIR="arrow/.flatbuffers" | ||||||
| FLATC="$FB_DIR/bazel-bin/flatc" | ||||||
|
|
||||||
| if [ -z $(which bazel) ]; then | ||||||
| echo "bazel is required to build flatc" | ||||||
| exit 1 | ||||||
| fi | ||||||
|
|
||||||
| echo "Bazel version: $(bazel version | head -1 | awk -F':' '{print $2}')" | ||||||
|
|
||||||
| if [ ! -e $FB_DIR ]; then | ||||||
| echo "git clone $FB_URL ..." | ||||||
| git clone -b master --no-tag --depth 1 $FB_URL $FB_DIR | ||||||
| if [ -z "$FLATC" ]; then | ||||||
| echo "Build flatc from source ..." | ||||||
|
|
||||||
| FB_URL="https://github.com/google/flatbuffers" | ||||||
| FB_DIR="arrow/.flatbuffers" | ||||||
| FLATC="$FB_DIR/bazel-bin/flatc" | ||||||
|
|
||||||
| if [ -z $(which bazel) ]; then | ||||||
| echo "bazel is required to build flatc" | ||||||
| exit 1 | ||||||
| fi | ||||||
|
|
||||||
| echo "Bazel version: $(bazel version | head -1 | awk -F':' '{print $2}')" | ||||||
|
|
||||||
| if [ ! -e $FB_DIR ]; then | ||||||
| echo "git clone $FB_URL ..." | ||||||
| git clone -b master --no-tag --depth 1 $FB_URL $FB_DIR | ||||||
| else | ||||||
| echo "git pull $FB_URL ..." | ||||||
| git -C $FB_DIR pull | ||||||
| fi | ||||||
|
|
||||||
| pushd $FB_DIR | ||||||
| echo "run: bazel build :flatc ..." | ||||||
| bazel build :flatc | ||||||
| popd | ||||||
| else | ||||||
| echo "git pull $FB_URL ..." | ||||||
| git -C $FB_DIR pull | ||||||
| echo "Using flatc $FLATC ..." | ||||||
| fi | ||||||
|
|
||||||
| pushd $FB_DIR | ||||||
| echo "run: bazel build :flatc ..." | ||||||
| bazel build :flatc | ||||||
| popd | ||||||
|
|
||||||
|
|
||||||
| # Execute the code generation: | ||||||
| $FLATC --filename-suffix "" --rust -o arrow-ipc/src/gen/ format/*.fbs | ||||||
|
|
||||||
|
|
@@ -99,37 +102,38 @@ for f in `ls *.rs`; do | |||||
| fi | ||||||
|
|
||||||
| echo "Modifying: $f" | ||||||
| sed -i '' '/extern crate flatbuffers;/d' $f | ||||||
| sed -i '' '/use self::flatbuffers::EndianScalar;/d' $f | ||||||
| sed -i '' '/\#\[allow(unused_imports, dead_code)\]/d' $f | ||||||
| sed -i '' '/pub mod org {/d' $f | ||||||
| sed -i '' '/pub mod apache {/d' $f | ||||||
| sed -i '' '/pub mod arrow {/d' $f | ||||||
| sed -i '' '/pub mod flatbuf {/d' $f | ||||||
| sed -i '' '/} \/\/ pub mod flatbuf/d' $f | ||||||
| sed -i '' '/} \/\/ pub mod arrow/d' $f | ||||||
| sed -i '' '/} \/\/ pub mod apache/d' $f | ||||||
| sed -i '' '/} \/\/ pub mod org/d' $f | ||||||
| sed -i '' '/use core::mem;/d' $f | ||||||
| sed -i '' '/use core::cmp::Ordering;/d' $f | ||||||
| sed -i '' '/use self::flatbuffers::{EndianScalar, Follow};/d' $f | ||||||
| sed --in-place='' '/extern crate flatbuffers;/d' $f | ||||||
|
||||||
| sed --in-place='' '/extern crate flatbuffers;/d' $f | |
| sed -i '/extern crate flatbuffers;/d' $f |
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.
IIRC Mac's sed (BSD utils) and the Linux coreutils sed behave differently. It's a bit of a pain.
Outdated
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.
I think this was another manual edit of the generated files. Moving it here should simplify the next time regen.sh is used. Are there any other manual edits which I haven't noticed?
Uh oh!
There was an error while loading. Please reload this page.
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.
Removing this line and having the test run successfully is quite compelling. Nice work @bkietz