Sponsored Content
Skip to content

chore: Add IWYU pragma for boost::optional to fix clang-tidy - #7088

Merged
bthomee merged 4 commits into
XRPLF:developfrom
mathbunnyru:remove_includes
May 6, 2026
Merged

chore: Add IWYU pragma for boost::optional to fix clang-tidy#7088
bthomee merged 4 commits into
XRPLF:developfrom
mathbunnyru:remove_includes

Conversation

@mathbunnyru

@mathbunnyru mathbunnyru commented May 6, 2026

Copy link
Copy Markdown
Contributor

High-Level Overview of Change

Needed after #7084
For some reason, clang-tidy thinks it's not needed, but it is - there are boost::optional in the code.

Context of Change

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

Copilot AI review requested due to automatic review settings May 6, 2026 19:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up source and test files by removing boost/optional/optional.hpp includes that became unnecessary after the dependency upgrades in #7084.

Changes:

  • Removes #include <boost/optional/optional.hpp> from several DB/SOCI-related implementation files.
  • Removes the same include from a couple of unit tests to reduce redundant header usage.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/xrpld/app/rdb/detail/PeerFinder.cpp Drops a Boost.Optional include from PeerFinder DB code.
src/xrpld/app/rdb/backend/detail/Node.cpp Drops a Boost.Optional include from relational DB backend implementation.
src/xrpld/app/misc/detail/Transaction.cpp Drops a Boost.Optional include from transaction SQL-loading implementation.
src/xrpld/app/misc/detail/AmendmentTable.cpp Drops a Boost.Optional include from amendment-table implementation.
src/test/overlay/short_read_test.cpp Drops a Boost.Optional include from an overlay/networking unit test.
src/test/core/SociDB_test.cpp Drops a Boost.Optional include from SOCI DB unit tests.
src/libxrpl/server/Wallet.cpp Drops a Boost.Optional include from wallet DB code.
src/libxrpl/server/State.cpp Drops a Boost.Optional include from state DB code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/test/overlay/short_read_test.cpp
@codecov

codecov Bot commented May 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.1%. Comparing base (13b72a4) to head (eb115d6).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #7088     +/-   ##
=========================================
- Coverage     82.1%   82.1%   -0.0%     
=========================================
  Files         1010    1010             
  Lines        76023   76023             
  Branches      7372    7367      -5     
=========================================
- Hits         62403   62401      -2     
- Misses       13620   13622      +2     
Files with missing lines Coverage Δ
src/libxrpl/server/State.cpp 94.9% <ø> (ø)
src/libxrpl/server/Wallet.cpp 79.1% <ø> (ø)
src/xrpld/app/misc/detail/AmendmentTable.cpp 95.0% <ø> (ø)
src/xrpld/app/misc/detail/Transaction.cpp 82.3% <ø> (ø)
src/xrpld/app/rdb/backend/detail/Node.cpp 59.3% <ø> (ø)
src/xrpld/app/rdb/detail/PeerFinder.cpp 81.8% <ø> (ø)

... and 2 files with indirect coverage changes

Impacted file tree graph

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

Copilot AI review requested due to automatic review settings May 6, 2026 21:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread src/xrpld/app/rdb/detail/PeerFinder.cpp
@mathbunnyru mathbunnyru changed the title chore: Remove redundant includes after dependencies upgrade chore: Add IWYU pragma for boost optional to make clang-tidy happy May 6, 2026
@mathbunnyru mathbunnyru changed the title chore: Add IWYU pragma for boost optional to make clang-tidy happy chore: Add IWYU pragma for boost::optional to fix clang-tidy May 6, 2026
@mathbunnyru mathbunnyru added Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval. labels May 6, 2026

@godexsoft godexsoft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@bthomee bthomee changed the title chore: Add IWYU pragma for boost::optional to fix clang-tidy chore: Add IWYU pragma for boost::optional to fix clang-tidy May 6, 2026
@bthomee
bthomee enabled auto-merge May 6, 2026 23:31
@bthomee
bthomee added this pull request to the merge queue May 6, 2026
Merged via the queue into XRPLF:develop with commit 8e2aa33 May 6, 2026
3 checks passed
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants