Skip to content
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-38053: [C++][Go] Re-generate sources from Schema.fbs #38054

Merged
merged 3 commits into from
Oct 9, 2023

Conversation

felipecrv
Copy link
Contributor

@felipecrv felipecrv commented Oct 5, 2023

Rationale for this change

Re-generate Go and C++ sources from Flatbuffers specs now including string-view and list-view types.

What changes are included in this PR?

Documentation fixes on the .fbs files and the generated C++ and Go source files.

Are these changes tested?

The files should be correct by construction. Existing tests guarantee that no mistake was made in re-generating the files.

@felipecrv felipecrv requested a review from zeroshade as a code owner October 5, 2023 19:47
@github-actions
Copy link

github-actions bot commented Oct 5, 2023

⚠️ GitHub issue #38053 has been automatically assigned in GitHub to PR creator.

@bkietz
Copy link
Member

bkietz commented Oct 6, 2023

Unfortunately, a string matching /<a\b/ can't be used in comments in flatbuffer schemas (since the comments are copied to the generated c++, where they are recognized as ill formed html). I corrected this in my PR but if you're going to regenerate here then you'll need to modify Message.fbs

https://github.com/apache/arrow/pull/37792/files#diff-0623d567d0260222d5501b4e169141b5070eabc2ec09c3482da453a3346c5bf3R109

@felipecrv
Copy link
Contributor Author

Thank you @bkietz. I pushed the fixes now and regenerated the sources again.

@felipecrv felipecrv force-pushed the flatbuffer_go_cpp branch 2 times, most recently from f21f3a9 to 22d521f Compare October 6, 2023 19:06
Copy link
Member

@zeroshade zeroshade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me from a Go standpoint, i'll wait for someone to approve in addition before merging this

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Oct 6, 2023
@pitrou pitrou force-pushed the flatbuffer_go_cpp branch from 22d521f to 49b424b Compare October 9, 2023 09:10
@@ -59,6 +59,7 @@ struct TensorDimBuilder {
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
TensorDimBuilder &operator=(const TensorDimBuilder &);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These declarations don't seem to cause any problem, but they are weird nevertheless, as the corresponding definitions do not exist. Which version of Flatbuffers did you use?

Using flatc version 23.5.26 (the latest release), I don't get these declarations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used version 1.12.0 which is the version that generates the smallest diff and causes the least trouble.

@pitrou
Copy link
Member

pitrou commented Oct 9, 2023

Regardless of which flatc version is being used, it seems we should perhaps upgrade the vendored flatbuffers headers to the same version.

For example, flatc 23.5.26 generates the following version check which seems to imply that the versions should match:

// Ensure the included flatbuffers.h is the same version as when this file was
// generated, otherwise it may not be compatible.
static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
              FLATBUFFERS_VERSION_MINOR == 5 &&
              FLATBUFFERS_VERSION_REVISION == 26,
             "Non-compatible flatbuffers version included");

@pitrou
Copy link
Member

pitrou commented Oct 9, 2023

@github-actions crossbow submit -g nightly-tests

@github-actions
Copy link

github-actions bot commented Oct 9, 2023

Revision: 49b424b

Submitted crossbow builds: ursacomputing/crossbow @ actions-66dcf81e0b

Task Status
example-cpp-minimal-build-static Github Actions
example-cpp-minimal-build-static-system-dependency Github Actions
example-cpp-tutorial Github Actions
example-python-minimal-build-fedora-conda Github Actions
example-python-minimal-build-ubuntu-venv Github Actions
test-alpine-linux-cpp Github Actions
test-build-cpp-fuzz Github Actions
test-build-vcpkg-win Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Azure
test-conda-python-3.10 Github Actions
test-conda-python-3.10-cython2 Github Actions
test-conda-python-3.10-hdfs-2.9.2 Github Actions
test-conda-python-3.10-hdfs-3.2.1 Github Actions
test-conda-python-3.10-pandas-latest Github Actions
test-conda-python-3.10-pandas-nightly Github Actions
test-conda-python-3.10-spark-v3.5.0 Github Actions
test-conda-python-3.10-substrait Github Actions
test-conda-python-3.11 Github Actions
test-conda-python-3.11-dask-latest Github Actions
test-conda-python-3.11-dask-upstream_devel Github Actions
test-conda-python-3.11-hypothesis Github Actions
test-conda-python-3.11-pandas-upstream_devel Github Actions
test-conda-python-3.11-spark-master Github Actions
test-conda-python-3.8 Github Actions
test-conda-python-3.8-pandas-1.0 Github Actions
test-conda-python-3.8-spark-v3.5.0 Github Actions
test-conda-python-3.9 Github Actions
test-conda-python-3.9-pandas-latest Github Actions
test-cuda-cpp Github Actions
test-cuda-python Github Actions
test-debian-11-cpp-amd64 Github Actions
test-debian-11-cpp-i386 Github Actions
test-debian-11-go-1.17 Azure
test-debian-11-go-1.20 Azure
test-debian-11-python-3 Azure
test-debian-c-glib Github Actions
test-debian-ruby Github Actions
test-fedora-35-cpp Github Actions
test-fedora-35-python-3 Azure
test-fedora-r-clang-sanitizer Azure
test-r-arrow-backwards-compatibility Github Actions
test-r-depsource-bundled Azure
test-r-depsource-system Github Actions
test-r-dev-duckdb Github Actions
test-r-devdocs Github Actions
test-r-gcc-11 Github Actions
test-r-gcc-12 Github Actions
test-r-install-local Github Actions
test-r-install-local-minsizerel Github Actions
test-r-library-r-base-latest Azure
test-r-linux-as-cran Github Actions
test-r-linux-rchk Github Actions
test-r-linux-valgrind Azure
test-r-minimal-build Azure
test-r-offline-maximal Github Actions
test-r-offline-minimal Azure
test-r-rhub-debian-gcc-devel-lto-latest Azure
test-r-rhub-debian-gcc-release-custom-ccache Azure
test-r-rhub-ubuntu-gcc-release-latest Azure
test-r-rstudio-r-base-4.1-opensuse153 Azure
test-r-rstudio-r-base-4.2-centos7-devtoolset-8 Azure
test-r-rstudio-r-base-4.2-focal Azure
test-r-ubuntu-22.04 Github Actions
test-r-versions Github Actions
test-skyhook-integration Github Actions
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-bundled Github Actions
test-ubuntu-20.04-cpp-minimal-with-formats Github Actions
test-ubuntu-20.04-cpp-thread-sanitizer Github Actions
test-ubuntu-20.04-python-3 Azure
test-ubuntu-22.04-cpp Github Actions
test-ubuntu-22.04-cpp-20 Github Actions
test-ubuntu-22.04-cpp-no-threading Github Actions
test-ubuntu-22.04-docs Github Actions
test-ubuntu-22.04-python-3 Github Actions
test-ubuntu-c-glib Github Actions
test-ubuntu-r-sanitizer Azure
test-ubuntu-ruby Github Actions

@pitrou
Copy link
Member

pitrou commented Oct 9, 2023

Regardless of which flatc version is being used, it seems we should perhaps upgrade the vendored flatbuffers headers to the same version.

That said, as long as CI doesn't complain, we can merge and bump Flatbuffers later.

@felipecrv
Copy link
Contributor Author

Regardless of which flatc version is being used, it seems we should perhaps upgrade the vendored flatbuffers headers to the same version.

That said, as long as CI doesn't complain, we can merge and bump Flatbuffers later.

The R-related failures seem unrelated.

@pitrou
Copy link
Member

pitrou commented Oct 9, 2023

Agreed, I think we can merge now.

@pitrou pitrou merged commit d353826 into apache:main Oct 9, 2023
48 of 50 checks passed
@pitrou pitrou removed the awaiting merge Awaiting merge label Oct 9, 2023
@felipecrv felipecrv deleted the flatbuffer_go_cpp branch October 9, 2023 14:56
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit d353826.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 11 possible false positives for unstable benchmarks that are known to sometimes produce them.

JerAguilon pushed a commit to JerAguilon/arrow that referenced this pull request Oct 23, 2023
…#38054)

### Rationale for this change

Re-generate Go and C++ sources from Flatbuffers specs now including string-view and list-view types.

### What changes are included in this PR?

Documentation fixes on the .fbs files and the generated C++ and Go source files.

### Are these changes tested?

The files should be correct by construction. Existing tests guarantee that no mistake was made in re-generating the files.
* Closes: apache#38053

Authored-by: Felipe Oliveira Carvalho <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…#38054)

### Rationale for this change

Re-generate Go and C++ sources from Flatbuffers specs now including string-view and list-view types.

### What changes are included in this PR?

Documentation fixes on the .fbs files and the generated C++ and Go source files.

### Are these changes tested?

The files should be correct by construction. Existing tests guarantee that no mistake was made in re-generating the files.
* Closes: apache#38053

Authored-by: Felipe Oliveira Carvalho <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…#38054)

### Rationale for this change

Re-generate Go and C++ sources from Flatbuffers specs now including string-view and list-view types.

### What changes are included in this PR?

Documentation fixes on the .fbs files and the generated C++ and Go source files.

### Are these changes tested?

The files should be correct by construction. Existing tests guarantee that no mistake was made in re-generating the files.
* Closes: apache#38053

Authored-by: Felipe Oliveira Carvalho <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Go][C++] Re-generate flatbuffer sources
4 participants