This is an automated email from the ASF dual-hosted git repository.
gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 1e3772cac5 GH-41343: [C++][CMake] Remove unused
ARROW_NO_DEPRECATED_API (#41345)
1e3772cac5 is described below
commit 1e3772cac5f45edb6ada3d20140b77cc86208346
Author: Gang Wu <[email protected]>
AuthorDate: Sat May 11 12:41:57 2024 +0800
GH-41343: [C++][CMake] Remove unused ARROW_NO_DEPRECATED_API (#41345)
### Rationale for this change
ARROW_NO_DEPRECATED_API is not used in the source code.
### What changes are included in this PR?
Remove ARROW_NO_DEPRECATED_API cmake variable.
### Are these changes tested?
Pass CIs.
### Are there any user-facing changes?
Perhaps yes, users used to set ARROW_NO_DEPRECATED_API to build Arrow will
see a warning for unknown CMake variable.
* GitHub Issue: #41343
Authored-by: Gang Wu <[email protected]>
Signed-off-by: Gang Wu <[email protected]>
---
ci/docker/debian-12-cpp.dockerfile | 1 -
ci/docker/linux-apt-r.dockerfile | 1 -
ci/docker/ubuntu-20.04-cpp-minimal.dockerfile | 1 -
ci/docker/ubuntu-20.04-cpp.dockerfile | 1 -
ci/docker/ubuntu-22.04-cpp-minimal.dockerfile | 1 -
ci/docker/ubuntu-22.04-cpp.dockerfile | 1 -
ci/docker/ubuntu-24.04-cpp.dockerfile | 1 -
ci/scripts/c_glib_build.sh | 3 ---
ci/scripts/cpp_build.sh | 1 -
cpp/CMakeLists.txt | 4 ----
cpp/cmake_modules/DefineOptions.cmake | 2 --
dev/conbench_envs/benchmarks.env | 1 -
docs/source/developers/cpp/building.rst | 7 ++++---
13 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/ci/docker/debian-12-cpp.dockerfile
b/ci/docker/debian-12-cpp.dockerfile
index 7036ddf27d..d7a6f9df2c 100644
--- a/ci/docker/debian-12-cpp.dockerfile
+++ b/ci/docker/debian-12-cpp.dockerfile
@@ -119,7 +119,6 @@ ENV ARROW_ACERO=ON \
ARROW_GANDIVA=ON \
ARROW_GCS=ON \
ARROW_HOME=/usr/local \
- ARROW_NO_DEPRECATED_API=ON \
ARROW_ORC=ON \
ARROW_PARQUET=ON \
ARROW_S3=ON \
diff --git a/ci/docker/linux-apt-r.dockerfile b/ci/docker/linux-apt-r.dockerfile
index a68354e3ab..630b96e100 100644
--- a/ci/docker/linux-apt-r.dockerfile
+++ b/ci/docker/linux-apt-r.dockerfile
@@ -113,7 +113,6 @@ ENV \
ARROW_GANDIVA=OFF \
ARROW_HDFS=OFF \
ARROW_JSON=ON \
- ARROW_NO_DEPRECATED_API=ON \
ARROW_ORC=OFF \
ARROW_PARQUET=ON \
ARROW_S3=ON \
diff --git a/ci/docker/ubuntu-20.04-cpp-minimal.dockerfile
b/ci/docker/ubuntu-20.04-cpp-minimal.dockerfile
index ae2ba9421c..e17c0306f1 100644
--- a/ci/docker/ubuntu-20.04-cpp-minimal.dockerfile
+++ b/ci/docker/ubuntu-20.04-cpp-minimal.dockerfile
@@ -85,7 +85,6 @@ ENV ARROW_ACERO=ON \
ARROW_HDFS=ON \
ARROW_HOME=/usr/local \
ARROW_INSTALL_NAME_RPATH=OFF \
- ARROW_NO_DEPRECATED_API=ON \
ARROW_ORC=ON \
ARROW_PARQUET=ON \
ARROW_S3=ON \
diff --git a/ci/docker/ubuntu-20.04-cpp.dockerfile
b/ci/docker/ubuntu-20.04-cpp.dockerfile
index 124256378b..d78c7a99cf 100644
--- a/ci/docker/ubuntu-20.04-cpp.dockerfile
+++ b/ci/docker/ubuntu-20.04-cpp.dockerfile
@@ -158,7 +158,6 @@ ENV absl_SOURCE=BUNDLED \
ARROW_HDFS=ON \
ARROW_HOME=/usr/local \
ARROW_INSTALL_NAME_RPATH=OFF \
- ARROW_NO_DEPRECATED_API=ON \
ARROW_ORC=ON \
ARROW_PARQUET=ON \
ARROW_S3=ON \
diff --git a/ci/docker/ubuntu-22.04-cpp-minimal.dockerfile
b/ci/docker/ubuntu-22.04-cpp-minimal.dockerfile
index dd887a6d00..341d8a87e8 100644
--- a/ci/docker/ubuntu-22.04-cpp-minimal.dockerfile
+++ b/ci/docker/ubuntu-22.04-cpp-minimal.dockerfile
@@ -85,7 +85,6 @@ ENV ARROW_ACERO=ON \
ARROW_HDFS=ON \
ARROW_HOME=/usr/local \
ARROW_INSTALL_NAME_RPATH=OFF \
- ARROW_NO_DEPRECATED_API=ON \
ARROW_ORC=ON \
ARROW_PARQUET=ON \
ARROW_S3=ON \
diff --git a/ci/docker/ubuntu-22.04-cpp.dockerfile
b/ci/docker/ubuntu-22.04-cpp.dockerfile
index eb189841cd..f12e7456ad 100644
--- a/ci/docker/ubuntu-22.04-cpp.dockerfile
+++ b/ci/docker/ubuntu-22.04-cpp.dockerfile
@@ -196,7 +196,6 @@ ENV absl_SOURCE=BUNDLED \
ARROW_HDFS=ON \
ARROW_HOME=/usr/local \
ARROW_INSTALL_NAME_RPATH=OFF \
- ARROW_NO_DEPRECATED_API=ON \
ARROW_ORC=ON \
ARROW_PARQUET=ON \
ARROW_S3=ON \
diff --git a/ci/docker/ubuntu-24.04-cpp.dockerfile
b/ci/docker/ubuntu-24.04-cpp.dockerfile
index 4a37818f94..ecfb5e2f50 100644
--- a/ci/docker/ubuntu-24.04-cpp.dockerfile
+++ b/ci/docker/ubuntu-24.04-cpp.dockerfile
@@ -178,7 +178,6 @@ ENV ARROW_ACERO=ON \
ARROW_HDFS=ON \
ARROW_HOME=/usr/local \
ARROW_INSTALL_NAME_RPATH=OFF \
- ARROW_NO_DEPRECATED_API=ON \
ARROW_ORC=ON \
ARROW_PARQUET=ON \
ARROW_S3=ON \
diff --git a/ci/scripts/c_glib_build.sh b/ci/scripts/c_glib_build.sh
index c4d2c4fdb5..6a6295e4ff 100755
--- a/ci/scripts/c_glib_build.sh
+++ b/ci/scripts/c_glib_build.sh
@@ -30,9 +30,6 @@ with_doc=$([ "${BUILD_DOCS_C_GLIB}" == "ON" ] && echo "true"
|| echo "false")
export PKG_CONFIG_PATH=${ARROW_HOME}/lib/pkgconfig
-export CFLAGS="-DARROW_NO_DEPRECATED_API"
-export CXXFLAGS="-DARROW_NO_DEPRECATED_API"
-
mkdir -p ${build_dir}
# Build with Meson
diff --git a/ci/scripts/cpp_build.sh b/ci/scripts/cpp_build.sh
index ceeab2455b..a1f40fc360 100755
--- a/ci/scripts/cpp_build.sh
+++ b/ci/scripts/cpp_build.sh
@@ -152,7 +152,6 @@ else
-DARROW_JSON=${ARROW_JSON:-ON} \
-DARROW_LARGE_MEMORY_TESTS=${ARROW_LARGE_MEMORY_TESTS:-OFF} \
-DARROW_MIMALLOC=${ARROW_MIMALLOC:-OFF} \
- -DARROW_NO_DEPRECATED_API=${ARROW_NO_DEPRECATED_API:-OFF} \
-DARROW_ORC=${ARROW_ORC:-OFF} \
-DARROW_PARQUET=${ARROW_PARQUET:-OFF} \
-DARROW_RUNTIME_SIMD_LEVEL=${ARROW_RUNTIME_SIMD_LEVEL:-MAX} \
diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
index df83f56dd2..679842c31e 100644
--- a/cpp/CMakeLists.txt
+++ b/cpp/CMakeLists.txt
@@ -431,10 +431,6 @@ endif()
# Compiler flags
#
-if(ARROW_NO_DEPRECATED_API)
- add_definitions(-DARROW_NO_DEPRECATED_API)
-endif()
-
if(ARROW_EXTRA_ERROR_CONTEXT)
add_definitions(-DARROW_EXTRA_ERROR_CONTEXT)
endif()
diff --git a/cpp/cmake_modules/DefineOptions.cmake
b/cpp/cmake_modules/DefineOptions.cmake
index dc0e5da63a..41466a1c22 100644
--- a/cpp/cmake_modules/DefineOptions.cmake
+++ b/cpp/cmake_modules/DefineOptions.cmake
@@ -158,8 +158,6 @@ if(ARROW_DEFINE_OPTIONS)
define_option_string(ARROW_GIT_DESCRIPTION "The Arrow git commit description
(if any)"
"")
- define_option(ARROW_NO_DEPRECATED_API "Exclude deprecated APIs from build"
OFF)
-
define_option(ARROW_POSITION_INDEPENDENT_CODE
"Whether to create position-independent target" ON)
diff --git a/dev/conbench_envs/benchmarks.env b/dev/conbench_envs/benchmarks.env
index 2a5a9c32a8..3af29491a8 100644
--- a/dev/conbench_envs/benchmarks.env
+++ b/dev/conbench_envs/benchmarks.env
@@ -31,7 +31,6 @@ ARROW_HOME=$CONDA_PREFIX
ARROW_INSTALL_NAME_RPATH=ON
ARROW_JEMALLOC=OFF
ARROW_MIMALLOC=ON
-ARROW_NO_DEPRECATED_API=ON
ARROW_ORC=ON
ARROW_PARQUET=ON
ARROW_PYTHON=ON
diff --git a/docs/source/developers/cpp/building.rst
b/docs/source/developers/cpp/building.rst
index 040a046c51..7b80d2138c 100644
--- a/docs/source/developers/cpp/building.rst
+++ b/docs/source/developers/cpp/building.rst
@@ -627,9 +627,10 @@ outputs like:
Deprecations and API Changes
----------------------------
-We use the compiler definition ``ARROW_NO_DEPRECATED_API`` to disable APIs that
-have been deprecated. It is a good practice to compile third party applications
-with this flag to proactively catch and account for API changes.
+We use the marco ``ARROW_DEPRECATED`` which wraps C++ deprecated attribute for
+APIs that have been deprecated. It is a good practice to compile third party
+applications with ``-Werror=deprecated-declarations`` (for GCC/Clang or similar
+flags of other compilers) to proactively catch and account for API changes.
Modular Build Targets
---------------------