Skip to content

build: vendor FetchContent dependencies by default - #1119

Open
manuzhang wants to merge 1 commit into
apache:mainfrom
manuzhang:build/vendor-dependencies-by-default
Open

manuzhang wants to merge 1 commit into
apache:mainfrom
manuzhang:build/vendor-dependencies-by-default

Conversation

@manuzhang

Copy link
Copy Markdown
Member

An installed Arrow package currently overrides the vendored version without a version check. For example, a default configuration on a host with Arrow 23.0.1 uses it even though the dependency toolchain pins Arrow 25.0.0.

Default FETCHCONTENT_TRY_FIND_PACKAGE_MODE to NEVER before declaring dependencies so FetchContent uses the pinned sources. Preserve explicit overrides and document -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN in both build guides and the provided-Arrow examples.

Validation:

  • Fresh CMake configurations confirmed vendored Arrow 25.0.0 with the default and installed Arrow/Parquet 23.0.1 with OPT_IN. Tests, REST and spdlog were disabled; existing Avro, nanoarrow and utf8proc source directories were reused.
  • Pre-commit passed for all three changed files.
  • git diff --check passed.

Validation covered configuration and dependency selection; no C++ build or test suite was run.

Copilot AI balanced review requested due to automatic review settings November 13, 2026 04:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@manuzhang
manuzhang requested review from wgtmac and zhjwpku November 13, 2026 04:49
@manuzhang

Copy link
Copy Markdown
Member Author

@zhjwpku @wgtmac I spotted this while reviewing #1112 and #1114, both of which require arrow 25 API while my local build still uses arrow 23.

## Build with CMake

Dependencies managed with CMake FetchContent use the pinned sources by default.
Set `-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=OPT_IN` to try installed packages before

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm wondering when user set this to OPT_IN with a unsupported installed package, will it pass the cmake configuration phase? If yes, should we error out earlier by adding versions to FIND_PACKAGE_ARGS?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants