Skip to content

v0.10.1 — clang-tidy stops scanning for modules it never builds

Choose a tag to compare

@rhalbersma rhalbersma released this 16 Sep 12:16
· 41 commits to main since this release
18949f8

A one-line fix for the single regression in v0.10.0, found by the first caller
to repin (xstd-ints#249).

Ninja plus a C++20-or-later target turns CMake's module scanner on, and the
scanner appends a response file — @<target>.dir/<source>.o.modmap — to every
compile command it writes into the database. The build step creates those
files, and clang-tidy.yml has no build step: it configures, then replays
compile_commands.json. So clang-tidy ran commands naming files nobody had
written, and all 44 translation units failed alike:

error: no such file or directory:
'@test/CMakeFiles/header.xstd.ints.bit.dir/.../xstd.ints.bit.cpp.o.modmap'
[clang-diagnostic-error]

CMAKE_CXX_SCAN_FOR_MODULES=OFF on that job's configure line drops the flag.
Nothing is lost: clang-tidy analyses sources rather than built module
interfaces, so the scan had no reader there. Every leg that builds what it
configures — the seven ladders, coverage, sanitizers, codeql and
consumption — keeps scanning and is untouched.

Upgrading from v0.10.0: repin, nothing else. Everything but the three
clang-tidy legs was already green under Ninja on xstd-ints' full ladder.