summaryrefslogtreecommitdiff
path: root/doc/future-designs
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-11-08 09:57:28 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-11-08 09:57:39 +0100
commitfb5cf5291ee9a78a4ba8e0e65bc99683459d39d0 (patch)
tree9d2967f52b47db64a51987593b269260422a4e94 /doc/future-designs
parent85560dee6eb114a08d4d1ce34e690002757475cd (diff)
downloadjustbuild-fb5cf5291ee9a78a4ba8e0e65bc99683459d39d0.tar.gz
Design computed roots: Add additional root type
... specifically for the use case of target files depending on the directory structure.
Diffstat (limited to 'doc/future-designs')
-rw-r--r--doc/future-designs/computed-roots.md23
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/future-designs/computed-roots.md b/doc/future-designs/computed-roots.md
index 4d1960e7..d34c3eb7 100644
--- a/doc/future-designs/computed-roots.md
+++ b/doc/future-designs/computed-roots.md
@@ -113,6 +113,19 @@ such that for each computed root, the referenced repository as well as
all repositories reachable from that one via the `"bindings"` map only
contain computed roots earlier in that order.
+### New root type `"tree structure"`
+
+In the described use case of generated target files, the tree of
+target files only depends on the structure of the workspace root. To
+avoid unnecessary actions, an additional new root type is defined,
+that of a `"tree structure"`. Such a root is given by precisely
+one root. It evaluates to that root but with all files replaced
+by empty files. Obviously, this computation can be done without
+spawning actions and is cachable.
+
+The serve functionality is extended to also answer queries for the
+tree structure of a given tree.
+
### Strict evaluation of roots as artifact tree
The building of required computed roots happens in topological order;
@@ -135,7 +148,15 @@ During a build, each computed root is evaluated only once, even if
required in several places. Two computed roots are considered equal, if
they are defined in the same way, i.e., repository name, target, and
configuration agree. The repository or layer using the computed root is
-not part of the root definition.
+not part of the root definition. Similarly, two tree-structure roots
+are equal if the defining roots are equal.
+
+### Evaluation through serve endpoint preferred
+
+When determining the value of a computed root, as for every export
+target, the provided serve endpoint (if any) is consulted first.
+Only if it is not aware of the root, a local evaluation is carried
+out. This strategy is also applied for tree-stucture roots.
### Computed roots available to the user