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

refactor(c)!: Updated include/install paths for adbc.h #1965

Merged
merged 38 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
833f7ba
refactor(c): Updated include/install paths for adbc.h
WillAyd Jul 3, 2024
e839a88
Meson fixes
WillAyd Jul 3, 2024
d31ff6e
R/Python fixes
WillAyd Jul 3, 2024
9275034
Updated includes and R fixes
WillAyd Jul 4, 2024
477eadc
Revert "Updated includes and R fixes"
WillAyd Jul 4, 2024
504e3bf
R fixes
WillAyd Jul 4, 2024
f7b156a
R touchups
WillAyd Jul 4, 2024
3c09df3
Fix glib includes
WillAyd Jul 4, 2024
0f62ed6
More glib fixups
WillAyd Jul 4, 2024
531ec73
glib fix attempt
WillAyd Jul 4, 2024
430f231
Merge branch 'main' into fix-adbc-include
WillAyd Jul 4, 2024
ce397a9
more fixes
WillAyd Jul 4, 2024
851e1c1
Use arrow-adbc in includes
WillAyd Jul 5, 2024
7df3fb4
Merge branch 'main' into fix-adbc-include
WillAyd Jul 6, 2024
ed6b2dc
Python / R include fixes
WillAyd Jul 6, 2024
b75c71a
Updates to CI, C#, Cython
WillAyd Jul 8, 2024
8acc11a
Python / glib fixes
WillAyd Jul 8, 2024
cb46c91
R fixes
WillAyd Jul 8, 2024
edc1db3
Fix bigquery test
WillAyd Jul 8, 2024
0d69371
More R fixes
WillAyd Jul 8, 2024
6f96985
Fix python sdist
WillAyd Jul 8, 2024
cc5a9ef
Moved adbc_driver_manager to include directory
WillAyd Jul 8, 2024
f3efc22
More fixes
WillAyd Jul 8, 2024
6e49c95
setup.py fix
WillAyd Jul 8, 2024
39ef10e
glib include cleanup
WillAyd Jul 8, 2024
5223a48
kou feedback
WillAyd Jul 10, 2024
4360ea9
Try C# fix
WillAyd Jul 10, 2024
8ed7e4e
Try more R fix
WillAyd Jul 10, 2024
4e3ee62
Merge remote-tracking branch 'upstream/main' into fix-adbc-include
WillAyd Jul 10, 2024
09cbc21
Merge branch 'main' into fix-adbc-include
WillAyd Jul 10, 2024
998bc47
try to fix r!
paleolimbot Jul 26, 2024
c162101
maybe fix sqlite/postgres
paleolimbot Jul 26, 2024
17f1cc0
possibly fix sqlite
paleolimbot Jul 26, 2024
773b3b2
don't vendor backward
paleolimbot Jul 26, 2024
07a7e3e
Remove curls
WillAyd Jul 26, 2024
1738bfe
Add backwards compatability for bare includes
WillAyd Jul 26, 2024
1998c1f
Merge branch 'main' into fix-adbc-include
WillAyd Jul 26, 2024
84549ce
Fix linux packaging CI
WillAyd Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ on:
branches:
- main
paths:
- "adbc.h"
- "c/**"
- "ci/**"
- "go/**"
- "python/**"
- ".github/workflows/integration.yml"
push:
paths:
- "adbc.h"
- "c/**"
- "ci/**"
- "go/**"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/native-unix.yml
Copy link
Member

Choose a reason for hiding this comment

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

I think we still want to trigger workflows when the header is updated?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, it's under c/include now, cool.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ on:
branches:
- main
paths:
- "adbc.h"
- "c/**"
- "ci/**"
- "docs/**"
Expand All @@ -33,7 +32,6 @@ on:
- ".github/workflows/native-unix.yml"
push:
paths:
- "adbc.h"
- "c/**"
- "ci/**"
- "docs/**"
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/native-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ on:
branches:
- main
paths:
- "adbc.h"
- "c/**"
- "ci/**"
- "glib/**"
Expand All @@ -32,7 +31,6 @@ on:
- ".github/workflows/native-windows.yml"
push:
paths:
- "adbc.h"
- "c/**"
- "ci/**"
- "glib/**"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ on:
- main
paths:
- ".env"
- "adbc.h"
- "c/**"
- "ci/**"
- "glib/**"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/r-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ on:
branches:
- main
paths:
- "adbc.h"
- "c/**"
- "go/adbc/driver/**"
- "go/adbc/pkg/**"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/r-standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ on:
branches:
- main
paths:
- "adbc.h"
- "c/**"
- "go/adbc/driver/**"
- "go/adbc/pkg/**"
Expand Down
5 changes: 5 additions & 0 deletions c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ add_subdirectory(vendor/nanoarrow)
add_subdirectory(driver/common)
add_subdirectory(driver/framework)

install(FILES "${REPOSITORY_ROOT}/c/include/arrow-adbc/adbc.h"
DESTINATION include/arrow-adbc)

if(ADBC_BUILD_TESTS)
add_subdirectory(validation)
endif()
Expand All @@ -54,6 +57,8 @@ if(ADBC_DRIVER_FLIGHTSQL)
endif()

if(ADBC_DRIVER_MANAGER)
install(FILES "${REPOSITORY_ROOT}/c/include/arrow-adbc/adbc_driver_manager.h"
DESTINATION include/arrow-adbc)
add_subdirectory(driver_manager)
endif()

Expand Down
2 changes: 1 addition & 1 deletion c/apidoc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ../../adbc.h ../../README.md ../../c/driver_manager/adbc_driver_manager.h
INPUT = ../../c/include/arrow-adbc/adbc.h ../../README.md ../../c/include/arrow-adbc/adbc_driver_manager.h

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
4 changes: 2 additions & 2 deletions c/driver/bigquery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ if(ADBC_BUILD_TESTS)
${TEST_LINK_LIBS})
target_compile_features(adbc-driver-bigquery-test PRIVATE cxx_std_17)
target_include_directories(adbc-driver-bigquery-test SYSTEM
PRIVATE ${REPOSITORY_ROOT}
${REPOSITORY_ROOT}/c/
PRIVATE ${REPOSITORY_ROOT}/c/
${REPOSITORY_ROOT}/c/include/
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver
${REPOSITORY_ROOT}/c/driver/common)
Expand Down
2 changes: 1 addition & 1 deletion c/driver/bigquery/bigquery_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <gmock/gmock-matchers.h>
#include <gtest/gtest-matchers.h>
#include <gtest/gtest-param-test.h>
Expand Down
5 changes: 3 additions & 2 deletions c/driver/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
add_library(adbc_driver_common STATIC utils.c)
adbc_configure_target(adbc_driver_common)
set_target_properties(adbc_driver_common PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}"
target_include_directories(adbc_driver_common PRIVATE "${REPOSITORY_ROOT}/c/include"
"${REPOSITORY_ROOT}/c/vendor")

if(ADBC_BUILD_TESTS)
Expand All @@ -35,6 +35,7 @@ if(ADBC_BUILD_TESTS)
nanoarrow)
target_compile_features(adbc-driver-common-test PRIVATE cxx_std_17)
target_include_directories(adbc-driver-common-test
PRIVATE "${REPOSITORY_ROOT}" "${REPOSITORY_ROOT}/c/vendor")
PRIVATE "${REPOSITORY_ROOT}/c/include"
"${REPOSITORY_ROOT}/c/vendor")
adbc_configure_target(adbc-driver-common-test)
endif()
2 changes: 1 addition & 1 deletion c/driver/common/driver_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <utility>
#include <vector>

#include <adbc.h>
#include <arrow-adbc/adbc.h>

// This file defines a developer-friendly way to create an ADBC driver, currently intended
// for testing the R driver manager. It handles errors, option getting/setting, and
Expand Down
2 changes: 1 addition & 1 deletion c/driver/common/driver_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <gtest/gtest.h>
#include <cstring>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include "driver_base.h"

// Self-contained version of the Handle
Expand Down
4 changes: 2 additions & 2 deletions c/driver/common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
adbc_common_lib = library(
'adbc_driver_common',
sources: ['utils.c'],
include_directories: [root_dir],
include_directories: [include_dir],
dependencies: [nanoarrow_dep],
install: true,
)
Expand All @@ -28,7 +28,7 @@ if get_option('tests')
'adbc-driver-common-test',
'utils_test.cc',
'driver_test.cc',
include_directories: [root_dir],
include_directories: [include_dir],
link_with: [adbc_common_lib],
dependencies: [nanoarrow_dep, gtest_main_dep, gmock_dep],
)
Expand Down
2 changes: 1 addition & 1 deletion c/driver/common/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <stdlib.h>
#include <string.h>

#include <adbc.h>
#include <arrow-adbc/adbc.h>

static size_t kErrorBufferSize = 1024;

Expand Down
2 changes: 1 addition & 1 deletion c/driver/common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <stdint.h>
#include <string.h>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include "nanoarrow/nanoarrow.h"

#ifdef __cplusplus
Expand Down
5 changes: 3 additions & 2 deletions c/driver/flightsql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ add_go_lib("${REPOSITORY_ROOT}/go/adbc/pkg/flightsql/"

foreach(LIB_TARGET ${ADBC_LIBRARIES})
target_include_directories(${LIB_TARGET} SYSTEM
INTERFACE ${REPOSITORY_ROOT} ${REPOSITORY_ROOT}/c/
INTERFACE ${REPOSITORY_ROOT}/c/
${REPOSITORY_ROOT}/c/include/
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
endforeach()
Expand All @@ -62,7 +63,7 @@ if(ADBC_BUILD_TESTS)
${TEST_LINK_LIBS})
target_compile_features(adbc-driver-flightsql-test PRIVATE cxx_std_17)
target_include_directories(adbc-driver-flightsql-test SYSTEM
PRIVATE ${REPOSITORY_ROOT} ${REPOSITORY_ROOT}/c/
PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
adbc_configure_target(adbc-driver-flightsql-test)
Expand Down
2 changes: 1 addition & 1 deletion c/driver/flightsql/dremio_flightsql_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <gmock/gmock-matchers.h>
#include <gtest/gtest-matchers.h>
#include <gtest/gtest-param-test.h>
Expand Down
2 changes: 1 addition & 1 deletion c/driver/flightsql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if get_option('tests')
'adbc-driver-flightsql-test',
'dremio_flightsql_test.cc',
'sqlite_flightsql_test.cc',
include_directories: [root_dir, driver_dir],
include_directories: [include_dir, c_dir, driver_dir],
link_with: [
adbc_common_lib,
adbc_driver_flightsql_lib
Expand Down
2 changes: 1 addition & 1 deletion c/driver/flightsql/sqlite_flightsql_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <random>
#include <thread>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <gmock/gmock-matchers.h>
#include <gtest/gtest-matchers.h>
#include <gtest/gtest-param-test.h>
Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ add_library(adbc_driver_framework STATIC base_driver.cc catalog.cc objects.cc)
adbc_configure_target(adbc_driver_framework)
set_target_properties(adbc_driver_framework PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(adbc_driver_framework
PRIVATE "${REPOSITORY_ROOT}" "${REPOSITORY_ROOT}/c/"
PRIVATE "${REPOSITORY_ROOT}/c/" "${REPOSITORY_ROOT}/c/include"
"${REPOSITORY_ROOT}/c/vendor")
target_link_libraries(adbc_driver_framework PUBLIC adbc_driver_common fmt::fmt)

Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/base_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <utility>
#include <vector>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <nanoarrow/nanoarrow.h>
#include <nanoarrow/nanoarrow.hpp>

Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/base_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <string_view>
#include <utility>

#include <adbc.h>
#include <arrow-adbc/adbc.h>

#include "driver/framework/base_driver.h"
#include "driver/framework/status.h"
Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/base_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <variant>
#include <vector>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <fmt/core.h>
#include <fmt/format.h>

Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/catalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <variant>
#include <vector>

#include <adbc.h>
#include <arrow-adbc/adbc.h>

#include "driver/framework/status.h"

Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ adbc_framework_lib = library(
'catalog.cc',
'objects.cc',
],
include_directories: [root_dir],
include_directories: [include_dir, c_dir],
link_with: [adbc_common_lib],
dependencies: [nanoarrow_dep, fmt_dep],
install: true,
Expand Down
2 changes: 1 addition & 1 deletion c/driver/framework/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <variant>
#include <vector>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <fmt/core.h>

/// \file status.h
Expand Down
14 changes: 7 additions & 7 deletions c/driver/postgresql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ add_arrow_lib(adbc_driver_postgresql
foreach(LIB_TARGET ${ADBC_LIBRARIES})
target_compile_definitions(${LIB_TARGET} PRIVATE ADBC_EXPORTING)
target_include_directories(${LIB_TARGET} SYSTEM
PRIVATE ${REPOSITORY_ROOT}
${REPOSITORY_ROOT}/c/
PRIVATE ${REPOSITORY_ROOT}/c/
${REPOSITORY_ROOT}/c/include/
${LIBPQ_INCLUDE_DIRS}
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
Expand Down Expand Up @@ -86,8 +86,8 @@ if(ADBC_BUILD_TESTS)
${TEST_LINK_LIBS})
target_compile_features(adbc-driver-postgresql-test PRIVATE cxx_std_17)
target_include_directories(adbc-driver-postgresql-test SYSTEM
PRIVATE ${REPOSITORY_ROOT}
${REPOSITORY_ROOT}/c/
PRIVATE ${REPOSITORY_ROOT}/c/
${REPOSITORY_ROOT}/c/include/
${LIBPQ_INCLUDE_DIRS}
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
Expand All @@ -108,8 +108,8 @@ if(ADBC_BUILD_TESTS)
${TEST_LINK_LIBS})
target_compile_features(adbc-driver-postgresql-copy-test PRIVATE cxx_std_17)
target_include_directories(adbc-driver-postgresql-copy-test SYSTEM
PRIVATE ${REPOSITORY_ROOT}
${REPOSITORY_ROOT}/c/
PRIVATE ${REPOSITORY_ROOT}/c/
${REPOSITORY_ROOT}/c/include/
${LIBPQ_INCLUDE_DIRS}
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
Expand All @@ -128,7 +128,7 @@ if(ADBC_BUILD_BENCHMARKS)
benchmark::benchmark)
# add_benchmark replaces _ with - when creating target
target_include_directories(postgresql-benchmark
PRIVATE ${REPOSITORY_ROOT} ${REPOSITORY_ROOT}/c/
PRIVATE ${REPOSITORY_ROOT}/c/ ${REPOSITORY_ROOT}/c/include/
${REPOSITORY_ROOT}/c/vendor
${REPOSITORY_ROOT}/c/driver)
endif()
2 changes: 1 addition & 1 deletion c/driver/postgresql/connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <utility>
#include <vector>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <libpq-fe.h>

#include "database.h"
Expand Down
2 changes: 1 addition & 1 deletion c/driver/postgresql/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <cstdint>
#include <memory>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <libpq-fe.h>

#include "postgres_type.h"
Expand Down
2 changes: 1 addition & 1 deletion c/driver/postgresql/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <utility>
#include <vector>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <libpq-fe.h>
#include <nanoarrow/nanoarrow.h>

Expand Down
2 changes: 1 addition & 1 deletion c/driver/postgresql/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <memory>
#include <string>

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <libpq-fe.h>

#include "postgres_type.h"
Expand Down
2 changes: 1 addition & 1 deletion c/driver/postgresql/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

#include <adbc.h>
#include <arrow-adbc/adbc.h>
#include <libpq-fe.h>

namespace adbcpq {
Expand Down
Loading
Loading