summaryrefslogtreecommitdiff
path: root/skills/incremental-builds.md
diff options
context:
space:
mode:
Diffstat (limited to 'skills/incremental-builds.md')
-rw-r--r--skills/incremental-builds.md21
1 files changed, 11 insertions, 10 deletions
diff --git a/skills/incremental-builds.md b/skills/incremental-builds.md
index 050bd1ba..47c06fd9 100644
--- a/skills/incremental-builds.md
+++ b/skills/incremental-builds.md
@@ -19,7 +19,8 @@ For example:
Use a fresh visited set for each candidate object. Cycles terminate safely,
but a provisional success inside a cycle must not be cached for another root.
-Dependencies owned by the same object are checked through its bundled sources.
+Each source compilation unit now owns its own object; units compiled together
+share a build timestamp so cycles do not invalidate themselves due to write order.
An unchanged public signature is insufficient: Simple imports implementation
details for optimization as well as declarations for type checking.
@@ -30,7 +31,7 @@ objects. Validating those combinations requires saved input versions, not a
guess from file times. A newer library object does invalidate a source-backed
local dependent that can be rebuilt.
-`IncrementalBuildTest` covers unchanged reuse, transitive source edits, bundled
+`IncrementalBuildTest` covers unchanged reuse, transitive source edits,
cycles, missing inputs, library dependencies, and clean/incremental native
execution parity. It sets file times directly, without sleeps.
@@ -39,16 +40,15 @@ execution parity. It sets file times directly, without sleeps.
- Plan object targets and rebuilds across invocations. Handle cycles as groups
and newly discovered dependencies. The compiler's per-object reuse check is
not a complete scheduling or linking policy.
-- Record actual input identities. An object can own several source units, so
- track all of their sources and resolved library paths and versions. A search
+- Record actual input identities: source units and resolved library paths and
+ versions. A search
path change can select a different library even with an older timestamp.
- Record compiler and serialization versions, target, ABI, and relevant
options. Content hashes would also detect changes with preserved timestamps.
Specify which changes require rebuilding source and which reject an
incompatible source-free library.
-- Make build targets match output ownership. The old ignored `testModule0`
- expects separate A.o and A/B.o, while the current compiler can bundle several
- units into one object. The target must identify the complete set it owns.
+- Make build targets account for every output of a compilation request, which
+ can discover several source units and produce a separate object for each.
- Provide an "ensure current" build operation. Explicit source compilation
currently always recompiles. An unchanged build should do no compilation or
linking; a changed object or link input should trigger relinking.
@@ -66,10 +66,11 @@ requests straightforward. A clean build and an incremental build must produce
the same observable program behavior.
Cover unchanged builds, direct and transitive source edits, inlined constants
-and bodies, cyclic dependencies, bundled sources, removed inputs, library-path
+and bodies, cyclic dependencies, multiple outputs, removed inputs, library-path
changes, compiler/target changes, and failed builds. Use controlled timestamps
or hashes instead of sleeps. Replace the ignored historical experiment with
tests matching the chosen object ownership model.
-Selective library IR loading is separate future work. It can reduce compile
-cost, but is not required to make conservative incremental rebuilding correct.
+Library IR loading is independent of build and native link dependencies.
+Summary-only imports still require coherent objects at link time, and inlining
+does not erase the build dependency on the object supplying the copied body.