Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Nov 6, 2025

This PR seeks to address feedback raised in the discussion of #33779, specifically from this comment:

Maybe a better approach would be to run the enforced sections in a separate, faster job? Some of the linters are already a bit annoying to invoke locally, so I usually just run the lint job. Doing the same for the includes seems fine to me.

Based on ideas from #32953.

@hebasto hebasto added the Tests label Nov 6, 2025
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 6, 2025

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/33810.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK w0xlt

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #31425 (RFC: Riscv bare metal CI job by TheCharlatan)

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.

Copy link
Contributor

@w0xlt w0xlt left a comment

Choose a reason for hiding this comment

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

Concept ACK

@fanquake
Copy link
Member

fanquake commented Nov 7, 2025

providing convenient feedback to developers.

How can we improve the quality of the feedback (#33779 (comment))? Getting it faster is nice, but if it can't be taken and applied directly without fixing the sorting, and the formatting, and in the worse case, changing headers entirely for modernize-deprecated-headers, then it doesn't seem that much more useful.

@hebasto
Copy link
Member Author

hebasto commented Nov 7, 2025

but if it can't be taken and applied directly without fixing the sorting, and the formatting, and in the worse case, changing headers entirely for modernize-deprecated-headers, then it doesn't seem that much more useful.

I disagree. In practice, when a developer works on changes that modify includes, the diff in the includes would typically be just a few lines. Using the diff from the CI job as a hint seems entirely reasonable. I don’t see a strong need to increase the script’s complexity just to produce a diff that can be immediately applied.

@hebasto hebasto force-pushed the 251106-force-iwyu-ci branch from f72b2f7 to 9bb013d Compare November 7, 2025 11:36
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

lgtm. Seems fine

@hebasto hebasto changed the title ci: Add fast IWYU job ci: Add IWYU job Nov 7, 2025
@hebasto hebasto force-pushed the 251106-force-iwyu-ci branch from 9bb013d to 9b50213 Compare November 7, 2025 12:11
@fanquake
Copy link
Member

fanquake commented Nov 7, 2025

just to produce a diff that can be immediately applied.

The diff can't be applied at all, how wrong it is varies, and there are no instructions for devs on how to fix it.

@maflcko
Copy link
Member

maflcko commented Nov 7, 2025

instructions

Some basic instructions could be added after the echo "^^^ ⚠️ Failure generated from IWYU", if needed.

@hebasto
Copy link
Member Author

hebasto commented Nov 7, 2025

instructions

Some basic instructions could be added after the echo "^^^ ⚠️ Failure generated from IWYU", if needed.

Happy to add them once someone suggests good wording.

@DrahtBot DrahtBot removed the CI failed label Nov 7, 2025
The executable target run by ctest is `mptest`.

This change removes unnecessary steps when building the `codegen`
target.
@hebasto hebasto force-pushed the 251106-force-iwyu-ci branch from 9b50213 to 3ee4105 Compare November 7, 2025 15:35
@hebasto
Copy link
Member Author

hebasto commented Nov 7, 2025

Rebased on top of the merged #33818.

@fanquake
Copy link
Member

fanquake commented Nov 7, 2025

The TSAN failure is #33318.

fi

if [ "${RUN_IWYU}" == "true" ]; then
# TODO: Consider enforcing IWYU across the entire codebase.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe:

echo "^^^ ⚠️ Failure generated from IWYU"
echo
echo "Some adjustments to the diff may be needed:"
echo
echo "* Use the C++ headers: E.g. <cerrno> over <errno.h>"
echo '* Use #include <__.h> over #include "__.h" for all headers'
echo "* Sort the headers, so that they are in the right pre-existing section, if"
echo "  there are any."

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! Added.

The change in `src/crypto/hex_base.cpp` is because GCC 14 is not
affected by an IWYU bug.
See: include-what-you-use/include-what-you-use#1763.
@hebasto hebasto force-pushed the 251106-force-iwyu-ci branch from bd48a10 to 1f55824 Compare November 7, 2025 17:52
Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

lgtm

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants