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/34352.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
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:
src/zmq and treat them as errors by hebasto)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-->
ACK fdc9fe2da6a8640b11a2871f8b653764652f8c1f
This PR fixes the src/primitives warnings as reported by iwyu on master:
<details>
/home/admin/actions-runner/_work/_temp/src/primitives/transaction.h should add these lines:
#include <compare> // for operator<
/home/admin/actions-runner/_work/_temp/src/primitives/transaction.h should remove these lines:
- #include <uint256.h> // lines 14-14
/home/admin/actions-runner/_work/_temp/src/primitives/transaction.cpp should add these lines:
#include <span> // for as_bytes, span
/home/admin/actions-runner/_work/_temp/src/primitives/transaction.cpp should remove these lines:
- #include <uint256.h> // lines 15-15
/home/admin/actions-runner/_work/_temp/src/primitives/block.h should add these lines:
#include <cinttypes> // for uint32_t, int64_t, int32_t
#include <string> // for string
#include <utility> // for move
#include <vector> // for vector
/home/admin/actions-runner/_work/_temp/src/primitives/block.h should remove these lines:
/home/admin/actions-runner/_work/_temp/src/primitives/block.cpp should add these lines:
#include <memory> // for shared_ptr
#include <span> // for as_bytes
#include <sstream> // for basic_stringstream, basic_ostream, operator<<, basic_ios, basic_iostream, basic_istream, stringstream
/home/admin/actions-runner/_work/_temp/src/primitives/block.cpp should remove these lines:
</details>
There is one deviation from the suggestion from the tool, in src/primitives/block.h not <cinttypes> is included but <cstdint>. This deviation is preferable, this include is a subset of <cinttypes> and is the 'correct' choice for the project.
After these changes the iwyu does not warn anymore:
<details>
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction.cpp has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/block.cpp has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/block.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction.h has correct #includes/fwd-decls)
(/home/admin/actions-runner/_work/_temp/src/primitives/transaction_identifier.h has correct #includes/fwd-decls)
</details>
also the folder is added to the iwyu enforcing list
review ACK fdc9fe2da6a8640b11a2871f8b653764652f8c1f 📀
<details><summary>Show signature</summary>
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 fdc9fe2da6a8640b11a2871f8b653764652f8c1f 📀
UB5Ype1A3WQdjfSaWb9SnYMwmdF45Ywya3AnUIggRLx85yULrAqgnuFbcjGPdknf4TpJfWFwPXoghJHe8dYXBw==
</details>
in the pull description, i think it is fine and sufficient to just link to https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#using-iwyu instead of all prior PRs
in the pull description, i think it is fine and sufficient to just link to https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#using-iwyu instead of all prior PRs
Thanks! Amended.
ACK fdc9fe2da6a8640b11a2871f8b653764652f8c1f