#36252 ci, iwyu: skip subtrees in compilation database
| Reviewability | Reviews | Agreement | Size | ||||
|---|---|---|---|---|---|---|---|
| #36252 ci, iwyu: skip subtrees in compilation database | Waiting on author | 2 | Strong | 0 + 11 tests | |||
|
|
|
|
| |||
Reviewability: ReadyStalePaused Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs. Size: lines added or modified outside tests, then in tests; greener = smaller. | |||||||
Goal
Filters excluded subtree paths out of the compilation database before running Include What You Use (IWYU) in CI. This prevents IWYU from analyzing source files in subtrees like libmultiprocess and generating suggestions that are immediately discarded.
Problem: The non-enforced IWYU CI pass analyzes 14 source files in src/ipc/libmultiprocess/, generating suggestions that conflict with upstream libmultiprocess CI checks and are immediately reverted via git restore.
Evidence of importance:
Reviewability
Paused · Waiting on author
Open objections from hebasto, maflcko with no author reply for 24 days; review would repeat what has been asked.
Waiting on (from the thread read):
- author: response to suggestions on using vanilla python or iwyu_tool.py --exclude 2026-09-25
- author: response to suggestions to use iwyu_tool.py --exclude or switch to a python runner 2026-09-25
Agreement
Strong
substantive support, no open objection (maflcko, David-Uka, BrandonOdiwuor)
Thread notes: Added hebasto's answered question about cmake subtree exclusion and maflcko's suggestion about replacing inline python/jq with a standalone script. Added BrandonOdiwuor's Concept ACK. / Added hebasto's initial question and ryanofsky's answer, maflcko's suggestion about a standalone Python script, and BrandonOdiwuor's Concept ACK.
Objections, suggestions, and questions:
| Reviewer | Type | Harm, request, or question | Status | Must be | Author replied | Quote |
|---|---|---|---|---|---|---|
| hebasto (member) | question, approach | Why not handle subtree exclusion via cmake as proposed in #35418? | answered · author explained why CI-level filtering is preferable to individual cmake target overrides | answered | yes | 2026-09-14: 'Why not https://github.com/bitcoin/bitcoin/pull/35418#pullrequestreview-4428862711?' Status from: 2026-09-14: ryanofsky: 'I think excluding all subtrees from IWYU is better than individually setting in CMAKE_EXPORT_COMPILE_COMMANDS inside individual subtrees' |
| maflcko (member) | suggestion, approach | Move the IWYU runner logic to a dedicated Python script and drop jq dependency | open | answered | no | 2026-09-17: 'All of those python3 -c '...' inside bash are fine, but seem a bit hacky. At some point we can use vanilla Python and drop the jq dep.' |
| hebasto (member) | suggestion, approach | Use the --exclude option of iwyu_tool.py instead of modifying compile_commands.json | open | answered | no | 2026-09-25: 'FWIW, we can use the `--exclude` option of the `iwyu_tool.py` tool' |
Support:
- maflcko (member) (ACK, 2026-09-17) [read: ci/test/03_test_script.sh]: minimal speed-up and minimally smaller ci log output
- David-Uka (contributor) (ACK, 2026-09-23) [read: ci/test/03_test_script.sh, compile_commands.json]: drops libmultiprocess sources preventing an IWYU crash on UsingShadowDecl while keeping git restore for subtree headers
- hebasto (member) (ACK, 2026-09-25): (no reason given) [not substantive]
- BrandonOdiwuor (contributor) (Concept ACK, 2026-10-08) [tested: compile_commands.json]: filtering SHARED_EXCLUDED_SUBTREES out of compile_commands.json before IWYU
Participants:
- hebasto (member, support, 3 statements 2026-09-14 to 2026-09-25): ACKed; suggested using iwyu_tool.py's --exclude option
- maflcko (member, support, 2 statements 2026-09-17 to 2026-09-17): ACKed; suggested replacing bash/jq/python inline commands with a dedicated python script
- David-Uka (contributor, support, 1 statements 2026-09-23 to 2026-09-23): ACKed noting it prevents LLVM 23 IWYU crash on UsingShadowDecl
- BrandonOdiwuor (contributor, support, 1 statements 2026-10-08 to 2026-10-08): Concept ACKed; supported maflcko's python script suggestion
Files
11 lines under test/bench/ci.
- ci/test/03_test_script.sh +11/-0
Card
The short text the ranking pass compares across PRs.
Filters excluded subtree sources out of compile_commands.json before running Include What You Use (IWYU) in CI. Currently, the non-enforced IWYU pass analyzes src/ipc/libmultiprocess/, producing warnings and suggested edits that conflict with upstream libmultiprocess CI and are reverted immediately after each run. Dropping subtree entries from the compilation database prevents wasted analysis and eliminates noisy CI output.
Data
thread read through 2026-10-08 (8 statements), head 01e3eca2d8
labels: none
Categories
Build and CI
P3 · cleanup
Filters excluded subtree paths to eliminate unnecessary IWYU analysis and log noise in CI. The non-enforced IWYU CI pass analyzed 14 source files in src/ipc/libmultiprocess/ only to discard the suggestions via git restore, and contributor review notes this avoids potential IWYU tool crashes on subtree code.
Membership: Changes ci/test/03_test_script.sh to filter excluded subtree paths from the compilation database before running IWYU.
Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 0