You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Generated source action is skipped after clearing a workspace member target: empty placeholder is compiled #778
A generated C++ source is replaced with an empty placeholder after clearing a workspace member's target directory. If the workspace-level target (and its Ninja log) is retained, the generator is skipped and the empty source is compiled.
Environment
mcpp 2026.10.5.3
Windows x64, LLVM 22.1.8, Ninja 1.12.1
MSVC 14.51.36231, Windows SDK 10.0.26100.0
Python 3 available as python on PATH
Reproduction
Create the six files below in a new directory, then run these PowerShell commands from its root:
mcpp build -p app --release
(Get-Item app/target/.build-mcpp/out/generated.cpp).Length
# Clear the member's build directory, preserving the workspace-level target.# Moving it aside avoids any destructive cleanup commands.Move-Item-LiteralPath app/target -Destination saved-app-target
mcpp build -p app --release
(Get-Item app/target/.build-mcpp/out/generated.cpp).Length
The first build succeeds and generated.cpp contains the definition of resource().
The second build fails with:
After the second build, generated.cpp exists but has length 0. The generator did not run: the workspace .ninja_log retains the original generation entry and adds new scan/compile entries for the empty source, without a new generation entry.
Expected behavior
Clearing a member's generated outputs should cause its source-generation action to run again. A scanner placeholder must not count as a valid generator output for incremental-build purposes.
Files
mcpp.toml
[workspace]
members = ["app"]
[toolchain]
windows = "llvm@22.1.8"
Activity