enhance: improve dependency source resolution#282
Open
suxiaogang223 wants to merge 3 commits into
Open
Conversation
b0f4d4d to
4926adc
Compare
There was a problem hiding this comment.
Pull request overview
This PR tightens third-party dependency resolution in the CMake toolchain to avoid inadvertently using unpatched system Arrow/ORC and to fail fast when “system” config packages expose library targets without usable development headers.
Changes:
- Disallow
Arrow_SOURCE=SYSTEM/ORC_SOURCE=SYSTEMand forceAUTOto resolve to bundled builds for Arrow and ORC. - Add a shared
paimon_find_target_headers()helper to validate headers for imported CMake targets. - Apply the header-validation logic across multiple
Find*Alt.cmakemodules (including the config-package paths for GTest and others).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cmake_modules/ThirdpartyToolchain.cmake | Forces Arrow/ORC to bundled (AUTO→BUNDLED) and errors out on SYSTEM for patched deps. |
| cmake_modules/DefineOptions.cmake | Updates Arrow/ORC option enums/descriptions to reflect SYSTEM being unsupported. |
| cmake_modules/FindPackageUtils.cmake | Adds shared helper to locate/validate headers associated with imported targets. |
| cmake_modules/FindzstdAlt.cmake | Validates headers for config targets before accepting system zstd. |
| cmake_modules/FindZLIBAlt.cmake | Validates headers for ZLIB::ZLIB config-package target paths. |
| cmake_modules/FindTBBAlt.cmake | Validates headers for TBB config targets before accepting system TBB. |
| cmake_modules/FindSnappyAlt.cmake | Validates headers for Snappy config targets before accepting system Snappy. |
| cmake_modules/FindLZ4Alt.cmake | Validates headers for LZ4 config targets before accepting system LZ4. |
| cmake_modules/FindRE2Alt.cmake | Validates headers for re2 config targets before accepting system RE2. |
| cmake_modules/FindRapidJSONAlt.cmake | Validates headers for RapidJSON config targets before accepting system RapidJSON. |
| cmake_modules/FindProtobufAlt.cmake | Requires protobuf headers + protoc when using config-package targets. |
| cmake_modules/FindGTestAlt.cmake | Adds config-package header validation for gtest/gmock targets. |
| cmake_modules/FindglogAlt.cmake | Validates headers for glog config targets before accepting system glog. |
| cmake_modules/FindfmtAlt.cmake | Validates headers for fmt config targets before accepting system fmt. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zjw1111
reviewed
May 14, 2026
Collaborator
|
Thanks for enhancing the dependency build module. Great work! 👍🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SYSTEMresolution for Arrow and ORC while paimon-cpp depends on project-specific patches.AUTOresolution for Arrow and ORC fall back to bundled builds.FindXXXAltconfig-package paths.Why
Arrow and ORC currently carry project-specific patches in paimon-cpp, so resolving them from system packages can miss required behavior. Some system dependency config packages can also expose library targets without the corresponding development headers, which lets configure pass and build fail later.
Validation
cmake -S . -B build/codex-deps-check -DPAIMON_BUILD_TESTS=OFF -DPAIMON_ENABLE_ORC=OFF -DPAIMON_DEPENDENCY_SOURCE=BUNDLEDcmake -S . -B build/codex-auto-check -DPAIMON_BUILD_TESTS=OFF -DPAIMON_ENABLE_ORC=OFFcmake -S . -B build/codex-arrow-system-check -DArrow_SOURCE=SYSTEM -DPAIMON_ENABLE_ORC=OFFfails as expected.cmake -S . -B build/codex-gtest-system-check -DPAIMON_BUILD_TESTS=ON -DPAIMON_ENABLE_ORC=ON -DPAIMON_DEPENDENCY_SOURCE=BUNDLED -DGTest_SOURCE=SYSTEMfails at configure time when the full GTest development package is unavailable.