-
Notifications
You must be signed in to change notification settings - Fork 739
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
regenerate arrow-ipc/src/gen with patched flatbuffers #6426
base: master
Are you sure you want to change the base?
regenerate arrow-ipc/src/gen with patched flatbuffers #6426
Conversation
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 |
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 don't know why but bash/sed produced an error for me until I made this substitution
sed: can't read /extern crate flatbuffers;/d: No such file or directory
Reading the man page, it seems like the expected invocation for the short flag is -ibackup
, equivalent to --inplace=backup
(or -i
, equivalent to --inplace=''
)
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
Should I replace this with
sed --in-place='' '/extern crate flatbuffers;/d' $f | |
sed -i '/extern crate flatbuffers;/d' $f |
|
||
# Some files need prefixes | ||
if [[ $f == "File.rs" ]]; then | ||
# Now prefix the file with the static contents | ||
echo -e "${PREFIX}" "${SCHEMA_IMPORT}" | cat - $f > temp && mv temp $f | ||
elif [[ $f == "Message.rs" ]]; then | ||
sed --in-place='' 's/List<Int16>/\`List<Int16>\`/g' $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.
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?
@@ -39,7 +39,7 @@ arrow-buffer = { workspace = true } | |||
arrow-cast = { workspace = true } | |||
arrow-data = { workspace = true } | |||
arrow-schema = { workspace = true } | |||
flatbuffers = { version = "24.3.25", default-features = false } | |||
flatbuffers = { default-features = false, git = "https://github.com/bkietz/flatbuffers.git", branch = "push-alignment-for-structs" } |
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.
Until google/flatbuffers#8398 merges
I suspect the flight failures are due to the slight increase in size due to padding FieldNode and Buffer vectors for alignment; the overages are all exactly 8 bytes greater than allowed. May I just increase the allowance? |
@tustvold @evgenyx00 could you verify this fixes the issue before we start asking for attention on google/flatbuffers? |
Which issue does this PR close?
Closes #5052
What changes are included in this PR?
This PR regenerates using patched codegen in google/flatbuffers#8398
$FLATC
environment variable is defined, that will be used instead of building flatc from source (useful when testing against patched codegen)flatbuffers::PushAlignment
to all generated files for reference by impls ofPush::alignment
cargo doc
andcargo test
didn't error locallyAre there any user-facing changes?
no