Skip to content

ARROW-10896: [C++][CMake] Rename internal RE2 package name to "re2" from "RE2" - #8908

Closed
kou wants to merge 3 commits into
apache:masterfrom
kou:cpp-re2
Closed

kou wants to merge 3 commits into
apache:masterfrom
kou:cpp-re2

Conversation

@kou

@kou kou commented Dec 14, 2020

Copy link
Copy Markdown
Member

Because upstream uses "re2". If we don't use different package name
such as "RE2", RE2 package is conflicted with other package that uses
RE2 such as gRPC.

This change also includes resolve_dependency() cleanup. There were
some custom resolve_dependency() like codes for packages that need our
custom "Alt" version such as Boost and gRPC. We can use
resolved_dependency() for these packages with the new HAVE_ALT option.

This change also renamed our Boost dependency name to "Boost" from
"BOOST". It means that users need to use -DBoost_SOURCE not
-DBOOST_SOURCE. To keep backward compatibility, -DBOOST_SOURCE is
still accepted when -DBoost_SOURCE isn't specified.

Users also need to use -Dre2_SOURCE not -DRE2_SOURCE. To keep backward
compatibility, -DRE2_SOURCE is still accepted when -Dre2_SOURCE isn't
specified.

@kou

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown

@kou

This comment has been minimized.

@github-actions

This comment has been minimized.

@kou

This comment has been minimized.

@github-actions

This comment has been minimized.

@kou

This comment has been minimized.

@github-actions

This comment has been minimized.

@nealrichardson

Copy link
Copy Markdown
Member

This change also renamed our Boost dependency name to "Boost" from
"BOOST". It means that users need to use -DBoost_SOURCE not
-DBOOST_SOURCE. To keep backward compatibility, -DBOOST_SOURCE is
still accepted when -DBoost_SOURCE isn't specified.

Users also need to use -Dre2_SOURCE not -DRE2_SOURCE. To keep backward
compatibility, -DRE2_SOURCE is still accepted when -Dre2_SOURCE isn't
specified.

I would love to have this kind of case-insensitive handling for all dependencies. This has tripped me up many times and it is difficult to explain to others why everything else is ALL_CAPS but these dependencies are a mix.

@kou

kou commented Dec 15, 2020

Copy link
Copy Markdown
Member Author

OK. How about using ARROW_${UPPERCASE_DEPENDENCY_NAME}_SOURCE CMake variables for them like ARROW_*_USE_SHARED?

If it sounds reasonable, we can work on it as a separated task.

@nealrichardson

Copy link
Copy Markdown
Member

Why does it need the ARROW_ namespace prefix?

I'm fine with anything that is intuitive and trivial to document.

@kou

kou commented Dec 15, 2020

Copy link
Copy Markdown
Member Author

Because of consistency.
If we use ARROW_${UPPERCASE_DEPENDENCY_NAME}_SOURCE not ${UPPERCASE_DEPENDENCY_NAME}_SOURCE, we can explain that you can customize how to use ${DEPENDENCY} by ARROW_${UPPERCASE_DEPENDENCY_NAME}_{SOURCE,USE_SHARED} CMake variables. It'll more intuitive than using ${UPPERCASE_DEPENDENCY_NAME}_SOURCE and ARROW_${UPPERCASE_DEPENDENCY_NAME}_USE_SHARED.

@kou

kou commented Dec 15, 2020

Copy link
Copy Markdown
Member Author

Anyway, we can handle it as a separated task. Let's discuss it at ARROW-10911 .

kou added 2 commits December 16, 2020 06:10
Because upstream uses "re2". If we don't use different package name
such as "RE2", RE2 package is conflicted with other package that uses
RE2 such as gRPC.

This change also includes resolve_dependency() cleanup. There were
some custom resolve_dependency() like codes for packages that need our
custom "Alt" version such as Boost and gRPC. We can use
resolved_dependency() for these packages with the new HAVE_ALT option.

This change also renamed our Boost dependency name to "Boost" from
"BOOST". It means that users need to use -DBoost_SOURCE not
-DBOOST_SOURCE. To keep backward compatibility, -DBOOST_SOURCE is
still accepted when -DBoost_SOURCE isn't specified.

Users also need to use -Dre2_SOURCE not -DRE2_SOURCE. To keep backward
compatibility, -DRE2_SOURCE is still accepted when -Dre2_SOURCE isn't
specified.
@kou

kou commented Dec 15, 2020

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit -g nightly

@github-actions

Copy link
Copy Markdown

Revision: 687fd61

Submitted crossbow builds: ursa-labs/crossbow @ actions-794

Task Status
centos-7-aarch64 TravisCI
centos-7-amd64 Github Actions
centos-8-aarch64 TravisCI
centos-8-amd64 Github Actions
conda-clean Azure
conda-linux-gcc-py36-aarch64 Drone
conda-linux-gcc-py36-cpu-r36 Azure
conda-linux-gcc-py36-cuda Azure
conda-linux-gcc-py37-aarch64 Drone
conda-linux-gcc-py37-cpu-r40 Azure
conda-linux-gcc-py37-cuda Azure
conda-linux-gcc-py38-aarch64 Drone
conda-linux-gcc-py38-cpu Azure
conda-linux-gcc-py38-cuda Azure
conda-linux-gcc-py39-aarch64 Drone
conda-linux-gcc-py39-cpu Azure
conda-linux-gcc-py39-cuda Azure
conda-osx-clang-py36-r36 Azure
conda-osx-clang-py37-r40 Azure
conda-osx-clang-py38 Azure
conda-win-vs2017-py36-r36 Azure
conda-win-vs2017-py37-r40 Azure
conda-win-vs2017-py38 Azure
debian-buster-amd64 Github Actions
debian-buster-arm64 TravisCI
example-cpp-minimal-build-static Github Actions
example-cpp-minimal-build-static-system-dependency Github Actions
gandiva-jar-osx TravisCI
gandiva-jar-xenial TravisCI
homebrew-cpp TravisCI
homebrew-r-autobrew TravisCI
nuget Github Actions
test-conda-cpp Github Actions
test-conda-cpp-valgrind Github Actions
test-conda-python-3.6 Github Actions
test-conda-python-3.6-pandas-0.23 Github Actions
test-conda-python-3.7 Github Actions
test-conda-python-3.7-dask-latest Github Actions
test-conda-python-3.7-hdfs-2.9.2 Github Actions
test-conda-python-3.7-kartothek-latest Github Actions
test-conda-python-3.7-kartothek-master Github Actions
test-conda-python-3.7-pandas-latest Github Actions
test-conda-python-3.7-pandas-master Github Actions
test-conda-python-3.7-spark-branch-3.0 Github Actions
test-conda-python-3.7-turbodbc-latest Github Actions
test-conda-python-3.7-turbodbc-master Github Actions
test-conda-python-3.8 Github Actions
test-conda-python-3.8-dask-master Github Actions
test-conda-python-3.8-hypothesis Github Actions
test-conda-python-3.8-jpype Github Actions
test-conda-python-3.8-pandas-latest Github Actions
test-conda-python-3.8-pandas-nightly Github Actions
test-conda-python-3.8-spark-master Github Actions
test-debian-10-cpp CircleCI
test-debian-10-go-1.12 Azure
test-debian-10-python-3 Azure
test-debian-c-glib CircleCI
test-debian-ruby CircleCI
test-fedora-33-cpp CircleCI
test-fedora-33-python-3 Azure
test-r-linux-as-cran Github Actions
test-r-rhub-ubuntu-gcc-release Azure
test-r-rocker-r-base-latest Azure
test-r-rstudio-r-base-3.6-bionic Azure
test-r-rstudio-r-base-3.6-centos8 Azure
test-r-rstudio-r-base-3.6-opensuse15 Azure
test-r-rstudio-r-base-3.6-opensuse42 Azure
test-ubuntu-16.04-cpp CircleCI
test-ubuntu-18.04-cpp CircleCI
test-ubuntu-18.04-cpp-cmake32 CircleCI
test-ubuntu-18.04-cpp-release CircleCI
test-ubuntu-18.04-cpp-static CircleCI
test-ubuntu-18.04-docs Azure
test-ubuntu-18.04-python-3 Azure
test-ubuntu-18.04-r-sanitizer Azure
test-ubuntu-20.04-cpp Github Actions
test-ubuntu-20.04-cpp-14 Github Actions
test-ubuntu-20.04-cpp-17 Github Actions
test-ubuntu-c-glib CircleCI
test-ubuntu-ruby Azure
ubuntu-bionic-amd64 Github Actions
ubuntu-bionic-arm64 TravisCI
ubuntu-focal-amd64 Github Actions
ubuntu-focal-arm64 TravisCI
ubuntu-groovy-amd64 Github Actions
ubuntu-groovy-arm64 TravisCI
ubuntu-xenial-amd64 Github Actions
ubuntu-xenial-arm64 TravisCI
wheel-manylinux1-cp36m Azure
wheel-manylinux1-cp37m Azure
wheel-manylinux1-cp38 Azure
wheel-manylinux1-cp39 Azure
wheel-manylinux2010-cp36m Azure
wheel-manylinux2010-cp37m Azure
wheel-manylinux2010-cp38 Azure
wheel-manylinux2010-cp39 Azure
wheel-manylinux2014-cp36m Azure
wheel-manylinux2014-cp37m Azure
wheel-manylinux2014-cp38 Azure
wheel-manylinux2014-cp39 Azure
wheel-osx-high-sierra-cp36m TravisCI
wheel-osx-high-sierra-cp37m TravisCI
wheel-osx-high-sierra-cp38 TravisCI
wheel-osx-mavericks-cp36m TravisCI
wheel-osx-mavericks-cp37m TravisCI
wheel-osx-mavericks-cp38 TravisCI
wheel-win-cp36m Github Actions
wheel-win-cp37m Github Actions
wheel-win-cp38 Github Actions

@kou

kou commented Dec 16, 2020

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit test-ubuntu-18.04-cpp-cmake32

@github-actions

Copy link
Copy Markdown

Revision: abf820c

Submitted crossbow builds: ursa-labs/crossbow @ actions-797

Task Status
test-ubuntu-18.04-cpp-cmake32 CircleCI

@kou

kou commented Dec 16, 2020

Copy link
Copy Markdown
Member Author

+1

The wheel-manylinux*-cp{36,37}* failures are unrelated. It's caused by #8887 .

The AppVeyor failure is also unrelated. It's caused by fsspec 0.8.4 -> 0.8.5.

@kou kou closed this in 8cb2d81 Dec 16, 2020
@kou
kou deleted the cpp-re2 branch December 16, 2020 03:20
@wesm

wesm commented Dec 17, 2020

Copy link
Copy Markdown
Member

hi @kou, I noticed that you simplified some things related to the Flight serialization customization -- is that a simplification that's due to a newer version of gRPC or was my workaround just more complicated than it needed to be?

@kou

kou commented Dec 17, 2020

Copy link
Copy Markdown
Member Author

@wesm Sorry, I should have mentioned to you this change.

is that a simplification that's due to a newer version of gRPC or was my workaround just more complicated than it needed to be?

Both of them.

You put the customization that uses grpc::protobuf::Message at 2019-02. gRPC changed to use grpc::protobuf::MessageLite from grpc::protobuf::Message since 1.22.0 that was released at 2019-06. I didn't confirm but the customization may not be used since gRPC 1.22.0. I don't know why we get build error with gRPC 1.34.0 but doesn't get with gRPC 1.22.0-1.33.2.

The main propose of this change is using grpc::protobuf::MessageLite not grpc::protobuf::Message. The simplification isn't needed. We could re-copy SerializationTraits from gRPC but I simplified. Because I think that copying will increase maintenance cost when gRPC changes something.

I confirmed that our custom serialization/deserialization codes are called with gRPC 1.34.0 by gdb. I didn't confirm performance because I don't have suitable environment. I also didn't confirm that they are called with gRPC 1.21.4 or older. Sorry.

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.

3 participants