ci, iwyu: fail job on compiler errors instead of silently logging them #36235

pull David-Uka wants to merge 1 commits into bitcoin:master from David-Uka:ci-iwyu-fail-on-compiler-errors changing 1 files +12 −0
  1. David-Uka commented at 12:58 AM on September 13, 2026: none

    Follow-up to #35468 and #36228, which fixed the fatal error: '…' file not found messages reported in #35361 by generating the required headers before IWYU runs.

    Those errors were only ever printed to the raw CI logs and never failed the job, because iwyu_tool.py's non-zero exit is swallowed by || true. That is how they went unnoticed for so long.

    IWYU cannot analyse a file that fails to compile, so this turns such compiler errors into a real CI failure: after capturing IWYU output, the job fails if it contains a clang fatal error: line and prints the offending file, pointing at the GOAL header targets in ci/test/00_setup_env_native_iwyu.sh. The check lives in run_iwyu() so it covers both the enforced and non-enforced passes, since the errors originally reported came from files in the non-enforced pass.

    This locks in the recent header-generation fixes and guards against regressions such as a new capnp-generated header or a renamed target.

    I confirmed the current master iwyu job log is free of fatal error: lines, so this does not turn CI red today.

    Closes #35361.

  2. ci, iwyu: fail job on compiler errors instead of silently logging them
    iwyu_tool.py's non-zero exit is swallowed by "|| true", so a compiler
    "fatal error:" (for example a generated header that was not built before
    IWYU ran) only ends up in the raw CI logs and never fails the job. This
    is how the errors reported in #35361 went unnoticed.
    
    IWYU cannot analyse a file that fails to compile, so fail the job when its
    output contains a "fatal error:" line, in both the enforced and
    non-enforced passes. This locks in the header-generation fixes from
    #35468 and #36228 and guards against regressions such as a new
    capnp-generated header or a renamed target.
    676a83f935
  3. DrahtBot commented at 12:59 AM on September 13, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    Concept ACK hebasto

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. hebasto commented at 9:31 AM on September 13, 2026: member

    Concept ACK.

    cc @maflcko

  5. David-Uka requested review from hebasto on Sep 15, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-15 18:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me