Task: Implement Hotfix: Windows CI builds timing out / failing on header dependency scanning
Table of Contents
This page documents a task in the Hotfix: Windows CI builds timing out / failing on header dependency scanning story. It captures the goal, current status, acceptance, and any notes or results.
Goal
Disable CMake's automatic C++20 module dependency scanning
(CMAKE_CXX_SCAN_FOR_MODULES) so Ninja stops invoking
clang-scan-deps for every translation unit on the Windows legs.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent story | Hotfix: Windows CI builds timing out / failing on header dependency scanning |
| Now | Fix merged via PR #1645; awaiting next scheduled Windows CI run to confirm green. |
| Waiting on | Nothing. |
| Next | Nothing — task closed. |
| Last touched | 2026-07-19 |
Acceptance
CMAKE_CXX_SCAN_FOR_MODULESis off for the project.- Local build succeeds; no behaviour change on Linux/macOS.
Plan
Root cause (from Windows CI logs, runs 29669098639 and 29548329266):
- Since CMake 3.28, the Ninja generator auto-enables
CMAKE_CXX_SCAN_FOR_MODULESfor compilers that support P1689 dependency scanning (MSVC, Clang) — even for projects that use no C++20 modules at all. This adds aclang-scan-depspre-pass per translation unit, invoked throughcmd.exe /C "...". cmd.exehas an ~8191-character command-line limit. ORE Studio's compile commands (many Boost-Ddefines plus a long transitive-Ilist) exceed that on some targets, so the scan command is silently truncated and drops trailing-Iflags — observed:ores.diff/includemissing from the scan invocation forores.dq.core, producing "file not found: ores.diff/domain/field_value.hpp".- The same scanning pre-pass, run for every TU across the whole project on the slower Windows runners, is the most likely explanation for the msvc-release leg hanging past the 6h timeout.
- The project does not use C++20 modules, so the scan pass buys
nothing. Fix: set
CMAKE_CXX_SCAN_FOR_MODULES OFFglobally in the rootCMakeLists.txt, before subdirectories are added.
Notes
Verified locally on linux-clang-debug-make: configure is clean and
ores.dq.core.lib (the target that failed on Windows) builds
successfully with the setting off, no behaviour change. Windows-side
verification will happen via CI on the PR, since no Windows runner is
available locally.
Test Scenarios
Manual QA scenarios (scaffolded via compass add test_scenario, run
through the QA Validation Runner panel) that verify this task. Link
new ones here as they're created; the scenario doc itself links back
via its "Verifies task" field.
| Scenario | State | Notes |
|---|---|---|
PRs
| PR | Title |
|---|---|
| #1645 | [build] Disable C++ module dependency scanning to fix Windows CI |
Review
| # | Comment summary | File | Decision | Notes |
|---|---|---|---|---|
| 1 | LGTM, two review rounds, no correctness issues found | CMakeLists.txt | Accepted | Minor nits (agile doc state drift, duplicate heading) fixed in follow-up commit |
Result
Set CMAKE_CXX_SCAN_FOR_MODULES OFF globally in the root
CMakeLists.txt, disabling CMake's automatic C++20 module
dependency-scanning pass (clang-scan-deps=/P1689) for Ninja +
MSVC/Clang. The project uses no C++20 modules, so the pass was pure
overhead; on Windows it was invoked through =cmd.exe, whose
~8191-char command-line limit silently truncated long transitive
-I=/-D= argument lists, dropping the ores.diff include path for
ores.dq.core and causing "file not found" errors, and adding
per-TU scan overhead that is the most likely cause of the
msvc-release leg hanging past the 6h CI timeout.
Acceptance met: setting confirmed off, local configure/build on
linux-clang-debug-make clean with no behaviour change (full
compass build completed green in the background). Landed via
PR #1645, merge-commit to main; Windows CI on the next scheduled
run is the platform-specific confirmation, since no Windows runner
was available locally.