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 |
|---|---|
| Stale ACK | stickies-v, 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.
This change is required for the subsequent commit to compile.
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.