Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Jan 16, 2026

First two commits address comments from discussion in #33779:

The last commit adds a new section to the Developer Notes to document IWYU usage.

`IWYU pragma: export` enforces the transitive inclusion of the headers,
which undermines the purpose of IWYU.

The remained cases seem useful and could be considered separately:
- `<cassert>` in `util/check.h`
- `<filesystem>` in `util/fs.h`
- `<chrono>` in `util/time.h`
@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 16, 2026

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34319.

Reviews

See the guideline for information on the review process.

Type Reviewers
Stale ACK maflcko

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

@maflcko
Copy link
Member

maflcko commented Jan 16, 2026

review ACK 923d9ec 🗝

Show signature

Signature:

untrusted comment: signature from minisign secret key on empty file; verify via: minisign -Vm "${path_to_any_empty_file}" -P RWTRmVTMeKV5noAMqVlsMugDDCyyTSbA3Re5AkUrhvLVln0tSaFWglOw -x "${path_to_this_whole_four_line_signature_blob}"
RUTRmVTMeKV5npGrKx1nqXCw5zeVHdtdYURB/KlyA/LMFgpNCs+SkW9a8N95d+U4AP1RJMi+krxU1A3Yux4bpwZNLvVBKy0wLgM=
trusted comment: review ACK 923d9ec210275380d8ccacd72076e45b3fe1300d 🗝
3gbYgUA7TO+HxA5uAklmQ6kkZ9K2WfRkMuZwtv0dac3+u03TG/UXcrLUYCRYjojS4wOsSRkBO8g6NXEbBkWYDA==

The [`include-what-you-use`](https://github.com/include-what-you-use/include-what-you-use) tool (IWYU)
helps to enforce the source code organization [policy](#source-code-organization) in this repository.

When running IWYU locally, it is recommended to use the same version as the [CI](/ci/test/00_setup_env_native_iwyu.sh)
Copy link
Member

Choose a reason for hiding this comment

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

Does this actually work? Doesn't the standard library/compiler version also need to match? I'm guessing it won't work for anyone on macOS?

I would think it'd be better to only recommended using the CI job (locally), so it's guaranteed to produce the same results.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Updated.

to a function that accepts a `std::string` parameter: an implicit conversion occurs at the callsite using the
`std::string` constructor, which makes the corresponding header required.

We accept these suggestions, and no further action is required to silence them.
Copy link
Member

Choose a reason for hiding this comment

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

If the suggestion has been applied, there shouldn't be anything left to silence?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks! Reworded.

@hebasto hebasto force-pushed the 260116-iwyu-export branch from 923d9ec to d9c244d Compare January 16, 2026 17:15
@hebasto
Copy link
Member Author

hebasto commented Jan 16, 2026

The recent feedback from @fanquake has been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants