Skip to content

Add USE_VENDORED_JSON option (fixes #959)#1080

Draft
facontidavide wants to merge 1 commit intomasterfrom
feature/use-vendored-json
Draft

Add USE_VENDORED_JSON option (fixes #959)#1080
facontidavide wants to merge 1 commit intomasterfrom
feature/use-vendored-json

Conversation

@facontidavide
Copy link
Collaborator

Summary

Test plan

  • Default build (USE_VENDORED_JSON=ON): 308/308 tests pass
  • System build (USE_VENDORED_JSON=OFF): 308/308 tests pass

Generated with Claude Code

Add a CMake option USE_VENDORED_JSON (default ON) so users can opt out
of the bundled nlohmann::json and link against their own system-installed
version, avoiding ODR violations when both versions coexist.

- Add USE_VENDORED_JSON CMake option with find_package when OFF
- Conditionally include vendored vs system json.hpp in 4 public headers
- Add BTCPP_VENDORED_JSON compile definition to control #ifdef
- Update install rules to exclude vendored json.hpp when OFF
- Add find_dependency in Config.cmake.in for downstream consumers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 1, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/use-vendored-json

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.90%. Comparing base (53040fa) to head (a58856c).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1080   +/-   ##
=======================================
  Coverage   65.90%   65.90%           
=======================================
  Files         225      225           
  Lines       12727    12727           
  Branches     1186     1186           
=======================================
  Hits         8388     8388           
  Misses       4289     4289           
  Partials       50       50           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant