This PR continues the ongoing effort to enforce IWYU warnings.
See Developer Notes.
This PR continues the ongoing effort to enforce IWYU warnings.
See Developer Notes.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36116.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline and AI policy for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | stickies-v |
| Concept ACK | fanquake |
| Stale ACK | jeanpablojp, Marisha-Sahay |
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
Rebased on top of the merged bitcoin/bitcoin#36112 and undrafted.
233 | @@ -234,7 +234,7 @@ fi 234 | 235 | if [[ "${RUN_IWYU}" == true ]]; then 236 | # TODO: Consider enforcing IWYU across the entire codebase. 237 | - FILES_WITH_ENFORCED_IWYU='/src/((bench|common|consensus|crypto|index|init|kernel|primitives|script|univalue/(lib|test)|util|zmq)/.*|node/(blockstorage|interfaces|miner|mining_args|utxo_snapshot)|test/fuzz/minisketch|rpc/mining|clientversion|core_io|signet|init)\.cpp' 238 | + FILES_WITH_ENFORCED_IWYU='/src/((bench|common|consensus|crypto|index|init|kernel|primitives|rpc|script|univalue/(lib|test)|util|zmq)/.*|node/(blockstorage|interfaces|miner|mining_args|utxo_snapshot)|test/fuzz/(kitchen_sink|minisketch|parse_univalue)|clientversion|core_io|signet|init)\.cpp'
Should rest.cpp also be covered here, since you've now fixed it up?
Good catch! That was lost during rebasing. I've restored it now.
233 | @@ -234,7 +234,7 @@ fi 234 | 235 | if [[ "${RUN_IWYU}" == true ]]; then 236 | # TODO: Consider enforcing IWYU across the entire codebase. 237 | - FILES_WITH_ENFORCED_IWYU='/src/((bench|common|consensus|crypto|index|init|kernel|primitives|script|univalue/(lib|test)|util|zmq)/.*|node/(blockstorage|interfaces|miner|mining_args|utxo_snapshot)|test/fuzz/minisketch|rpc/mining|clientversion|core_io|signet|init)\.cpp' 238 | + FILES_WITH_ENFORCED_IWYU='/src/((bench|common|consensus|crypto|index|init|kernel|primitives|rpc|script|univalue/(lib|test)|util|zmq)/.*|node/(blockstorage|interfaces|miner|mining_args|utxo_snapshot)|test/fuzz/(kitchen_sink|minisketch|parse_univalue)|rpc/mining|clientversion|core_io|rest|signet|init)\.cpp'
I think rpc/mining is covered under rpc now and can be removed? (this was added in latest rebase)
Thanks! Fixed.
ACK 1bc42956730d95ba7ab7441586ec5186e362e12a
tACK 1bc42956730d95ba7ab7441586ec5186e362e12a
Built and ran the unit suite and a slice of the RPC functional tests. I also ran the old and the new FILES_WITH_ENFORCED_IWYU against compile_commands.json. Nineteen files come into the enforced set, none drops out, and rpc/mining.cpp stays covered.
3 | @@ -4,6 +4,7 @@ 4 | // file COPYING or http://www.opensource.org/licenses/mit-license.php. 5 | 6 | #include <common/signmessage.h> 7 | +
nit: ten of the eleven files in src/rpc that define a Register*RPCCommands function include <rpc/register.h> as an associated header. That includes blockchain.cpp and mempool.cpp, where IWYU already infers one. Was leaving signmessage.cpp out deliberate?
Thanks! Fixed.
tACK 1bc4295 on macOS. Replicated @jeanpablojp : Built the node from scratch with CMake, ran the unit tests (ctest), and ran the RPC functional tests (test/functional/test_runner.py rpc*). Everything compiled cleanly and tests passed.
@Marisha-Sahay Looks like you've ACK'd a prior commit hash.
This needs a rebase.
This change is required for the subsequent commit to compile.
<!--85328a0da195eb286784d51f73fa0af9-->
🚧 At least one of the CI tasks failed.
<sub>Task iwyu: https://github.com/bitcoin/bitcoin/actions/runs/34344007409/job/102441186642</sub>
<sub>LLM reason (✨ experimental): CI failed because the IWYU (include-what-you-use) lint job generated a failure (Failure generated from IWYU).</sub>
<details><summary>Hints</summary>
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
</details>
This needs a rebase.
Rebased.
re-ACK 7d54a88b44530e5a37f8881b1ea73c2edd8ef541