chore: Add IWYU pragma for boost::optional to fix clang-tidy - #7088
Merged
Conversation
bthomee
approved these changes
May 6, 2026
Contributor
There was a problem hiding this comment.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
boost::optional to fix clang-tidy
bthomee
enabled auto-merge
May 6, 2026 23:31
beartec-jpg
pushed a commit
to beartec-jpg/FalconLedger
that referenced
this pull request
Jun 1, 2026
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.
High-Level Overview of Change
Needed after #7084
For some reason, clang-tidy thinks it's not needed, but it is - there are
boost::optionalin the code.Context of Change
API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)