Repository navigation
fix: resolve nlohmann_json target conflict in Docker build - #8996
Conversation
Arrow 23's CMake config imports nlohmann_json as a system target. When USE_EXTERNAL_JSON is OFF (default), the bundled copy then fails with "add_library cannot create target because an imported target with the same name already exists". Detect the pre-existing imported target and reuse it instead of building the bundled copy. Also remove superpowers plan/spec documents. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR removes documentation for a planned Biosaur2 seeding feature in ProteomicsLFQ (plan and design specification files) and adds a CMake guard to prevent duplicate nlohmann_json target imports when Arrow/Parquet packages are configured. Changes
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/openms/extern/CMakeLists.txt`:
- Around line 41-44: The conflict-avoidance logic using USE_EXTERNAL_JSON and
TARGET nlohmann_json::nlohmann_json must not live inside the vendored
CMakeLists; remove or revert the if-block from the vendored extern CMake file
and instead set or derive the USE_EXTERNAL_JSON variable and call
find_package(nlohmann_json REQUIRED GLOBAL) from a non-vendored CMake entry
point (e.g., the top-level project CMake before including the extern subtree) so
the vendored code remains untouched while preserving the same resolution
behavior for nlohmann_json::nlohmann_json.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 58045e69-f7a9-4383-a68d-6cec628709c7
📒 Files selected for processing (3)
docs/superpowers/plans/2026-03-24-biosaur2-seeding-in-proteomicslfq.mddocs/superpowers/specs/2026-03-24-biosaur2-seeding-in-proteomicslfq-design.mdsrc/openms/extern/CMakeLists.txt
💤 Files with no reviewable changes (2)
- docs/superpowers/plans/2026-03-24-biosaur2-seeding-in-proteomicslfq.md
- docs/superpowers/specs/2026-03-24-biosaur2-seeding-in-proteomicslfq-design.md
…Libs Move the TARGET nlohmann_json::nlohmann_json detection out of the vendored extern/CMakeLists.txt and into cmake/cmake_findExternalLibs.cmake right after find_package(Arrow). When Arrow imports nlohmann_json as a transitive dependency, USE_EXTERNAL_JSON is forced ON so the vendored code takes its existing external-library path without modification. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Yes. Any other deps that we could reuse for the ones we build inside our own CMake? |
|
did not see any |
Summary
nlohmann_jsonas a system target, which then conflicts with OpenMS's bundled copy trying toadd_library(nlohmann_json ...)Root cause
The
deploy-dockerCI job installs Arrow 23 via apt, which pulls in systemnlohmann_json(3.10.5). Arrow'sArrowConfig.cmakecreates an importednlohmann_json::nlohmann_jsontarget. Later,src/openms/extern/nlohmann_json/CMakeLists.txt:106callsadd_library(nlohmann_json INTERFACE)which fails because the target name is already taken.Test plan
deploy-dockerCI job passesUSE_EXTERNAL_JSON=ONpath still works as before🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation
Chores