-
Notifications
You must be signed in to change notification settings - Fork 37.8k
ci, iwyu: Treat warnings as errors for specific directories #31308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code Coverage & BenchmarksFor details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31308. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, 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. |
16dc941
to
2df21bd
Compare
219d53e
to
fc855c6
Compare
1646c06
to
2001fe8
Compare
2001fe8
to
d838f1b
Compare
Rebased. |
Only change is rebase. re-ACK a4fa7b9 🚇 Show signatureSignature:
|
a4fa7b9
to
1d49346
Compare
re-ACK 1d49346 📶 Show signatureSignature:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK
@@ -33,7 +33,9 @@ echo "=== BEGIN env ===" | |||
env | |||
echo "=== END env ===" | |||
|
|||
( | |||
if [ "$RUN_TIDY" != "true" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we fix this in https://github.com/bitcoin-core/leveldb-subtree/pulls instead?
I have opened bitcoin-core/leveldb-subtree#56 (I'm also fine with doing it in a different PR, just wanted to give the possibility to solve it in a cleaner way)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection, but I am not sure we should diverge the subtree for a test-only patch. Also, the patch is pre-existing, so it seems a bit unrelated to this pull.
Ideally, Google would fix the UB in some way or another, and then we can pull whatever their fix was, but that shouldn't be a blocker here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main leveledb repo doesn't even compile for the past 8 months, not sure why we would wait for them. But as I mentioned, I don't mind doing it after the PR, just seems cleaner if we didn't need to change this section again.
struct IndexSummary { | ||
std::string name; | ||
bool synced{false}; | ||
int best_block_height{0}; | ||
uint256 best_block_hash; | ||
}; | ||
namespace interfaces { | ||
struct BlockRef; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I understand why this was needed, but I haven't run the scripts, just tried to find out locally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwd decls are slimmer than a full include, and often sufficient, for example when the header only uses the types as pointers or references. IWYU will suggest them sometimes, when possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, that wasn't my question. But I'll figure it out next, feel free to resolve it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 128 in 1d49346
[[nodiscard]] virtual bool CustomInit(const std::optional<interfaces::BlockRef>& block) { return true; } |
You may be interested in these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 1d49346. Makes sense to try IWYU in a few directories like this to see how stable it is and make sure it won't cause problems.
1d49346
to
d03d861
Compare
The feedback from @ryanofsky has been addressed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK d03d861. Just fixing up comment and changing variable name since last review. Thanks for the updates!
d03d861
to
9c8b8fe
Compare
IWYU issue bitcoin#1763 appears to be a corner case, so it has been addressed using a local pragma rather than a global mapping.
9c8b8fe
to
3a0456d
Compare
Rebased due to a conflict with #30469. |
Currently, this applies only to the `crypto` and `index` directories.
3a0456d
to
02d2b5a
Compare
Concept ACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 02d2b5a. Just rebased and update tidy patch comment again since last review
This PR is the first step towards treating IWYU warnings as errors. At this stage, it applies only to the
crypto
andindex
directories.