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
Commit f4151de
Browse filesBrowse the repository at this point in the historyBrowse files
runtime_search_dir, the prepare role, and a stamp newer than every input (mcpp#701, mcpp#702)
Re-implements #701/#702's two prior commits to design
.agents/docs/2026-09-26-compile-database-and-issue-699-design.md §5.4, and
adds P, the `prepare` role the design's O1 asks for. One protocol bump (12)
and one cache-format epoch bump (3) cover all three.
R1'. `mcpp::runtime_search_dir(dir)` (`mcpp:runtime-search-dir=`, protocol
12) replaces the branch's `runtime_library_dir`: a launch-time search
directory a build.mcpp discovers (a vcpkg prefix's `bin/`, a Qt SDK's
`bin/`, a directory a `prepare` action populates) rather than one an author
writes into a fixed TOML array. It lands DIRECTLY on
`LinkIntent::runtimeSearchDirs` -- the field `runtime_search_dirs` itself
populates -- not the retiring `RuntimeConfig::libraryDirs` the branch had
joined by mistake, so every existing reader (the plan merge, RUNPATH/rpath,
`mcpp run`'s loader path, `mcpp pack`'s closure search) sees a
directive-declared directory exactly as it sees the manifest key's, and a
dependency's declaration reaches its consumer's executable through the same
merge. The directory need not exist when the program runs.
R2. After a `check` or `prepare` command succeeds, the engine creates every
declared stamp that is missing and sets the modification time of every
existing one to the present, whether or not the command wrote it; on
failure it writes nothing. This replaces the branch's before/after time
comparison with R2's simple form: a stamp feeds no compile or link edge, so
touching one the command already wrote changes no build.
P. The `prepare` role (`mcpp::roles::prepare`, alongside `source`, `check`,
`object`, `artifact`) is for construction whose file names are unknown when
the build program runs -- installing a vcpkg manifest or a CMake subproject
into a prefix, unpacking an SDK. Outputs: one or more stamps, written by the
engine through the same wrapper as `check`, and one declared directory
(`mcpp::action::output_dir`) the command populates. When the command
succeeds and that directory does not exist, the engine writes no stamp and
fails the edge, naming the directory. Every compile edge of the declaring
package waits for it, as a blocking `check` does today; so does every LINK
edge in the plan, because `plan.linkIntent` -- and therefore the `$ldflags`
every link rule interpolates -- is one value merged from every package's
LinkGlobal directives, read alike by the declaring package's own link and
by every package that depends on it. The #534 self-check
(`check_action_ordering`) is extended to assert this for links, the same
way it already does for compiles. Progress lines label it `PREPARE`. An
unknown role string is refused, naming the value and the five roles, where
it used to be read as `source` silently -- the cache-format epoch moves to
3 so a stale entry from before this guard existed is re-validated rather
than replayed two different ways by two code paths. A build program whose
`rerun_if_changed`/`rerun_if_changed_glob` names a path inside a `prepare`
directory (of any package in the graph) is warned, naming both paths: that
directory is populated at build time, after configuration has already run.
0 commit comments