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
fix: watch parent-directory glob inputs in build programs #764
rerun_if_changed_glob("../inputs/**/*.in") silently fingerprints an empty set, even when matching files exist beside the package. Adding or removing those files therefore does not rerun build.mcpp on either the build-program cache path or the project fast path.
This affects workspace members using shared vcpkg overlay directories: mcpp-plugins 0.18.1's mcpp::deps::watch_tree derives a path relative to manifest_dir() and emits exactly this form when the overlay lives outside the member.
Use a normal executable package for app, and a build program which declares:
mcpp::rerun_if_changed_glob("../inputs/**/*.in");
Have the program enumerate manifest_dir()/../inputs and generate a function returning the number of .in files, as in tests/e2e/194_build_mcpp_glob_input.sh but with a sibling input directory.
Build and run app: the generated function returns 1.
Add inputs/b.in, without editing the manifest, build program or existing source files.
Build and run app again.
Expected: the build program reruns and the executable returns 2.
Actual: the build program is not invalidated and the generated function still returns 1. In the real workspace, build.mcpp.cache records glob cbf29ce484222325 ../vcpkg-scripts/ports/** (the empty-set fingerprint) while that directory contains multiple ports.
Cause and proposed fix
modules/buildmcpp/src/directives.cppm::glob_fingerprint always starts its recursive iterator at the package root. path_matches_glob cannot match an external file which was never enumerated. The source scanner already derives a glob's literal directory prefix to choose its walk root; the rerun fingerprint should share that derivation rather than independently assuming every input lives under the package.
The fix should preserve sorted path-set fingerprints, content-independent glob invalidation, output/.git exclusions and the no-directory-symlink rule. Regression coverage should exercise sibling and ancestor directories, previously missing input directories, and actual builds taking the fast path.
Environment
mcpp 2026.10.3.1, latest main at 6e3cb974d199546112ef13f65597a912a06cb899
Windows 11, LLVM 22.1.8 / MSVC ABI
mcpp-plugins 0.18.1
The iterator's root restriction is platform independent.
Activity
fix: watch parent-directory glob inputs in build programs (#765)