File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ discovers, as follows:
59
59
directory, but which **are** the output of some task. The client is
60
60
currently responsible for ensuring that any commands which produce output
61
61
in the directory should be strongly ordered before the signature node.
62
+
63
+ However, clients can explicitly make additional dependencies on the
64
+ directory tree by registering a phony command which produces the directory
65
+ used by the tree signature, and which adds input dependencies on other
66
+ nodes in the graph (for example, ones which may or may not produce content
67
+ within the directory tree, and thus must be run before it).
62
68
```
63
69
64
70
3 . Recursively request directory signatures for any directories discovered as
Original file line number Diff line number Diff line change @@ -81,6 +81,14 @@ These are the supported node types:
81
81
file on disk is changed. This is useful when the client cannot easily know
82
82
in advance whether the node is expected to be a file or a directory, but
83
83
should be treated as a directory tree if it is one.
84
+
85
+ The directory tree will eagerly scan the directory as soon as any commands
86
+ which produce the immediate directory are complete. This means that the build
87
+ graph **MUST ** contain a complete dependency graph between the tree node and
88
+ any command which may produce content within the directory. If such a
89
+ dependency is missing, the build system will typically end up scanning the
90
+ directory before all content is produced, and this will result in the first
91
+ build being incomplete, and the next build redoing the remainder of the work.
84
92
85
93
* Virtual Nodes: Nodes matching the name ``'<.*>' ``, e.g. ``<gate-task> ``, are
86
94
*assumed * to be virtual nodes, and are used for adding arbitrary edges to the
Original file line number Diff line number Diff line change
1
+ # Check the ability of clients to add additional dependency on a directory tree.
2
+ #
3
+
4
+ # This is important because currently llbuild won't necessarily try to find any
5
+ # unmodeled dependency edges between outputs which fill in contents of a
6
+ # directory and the directory tree node itself. Currently, clients must supply
7
+ # any missing unmodeled edges explicitly.
8
+ #
9
+ # RUN: rm -rf %t.build
10
+ # RUN: mkdir -p %t.build
11
+ # RUN: cp %s %t.build/build.llbuild
12
+ # RUN: echo "file" > %t.build/file
13
+ # RUN: %{llbuild} buildsystem build --serial --chdir %t.build > %t.initial.out
14
+ # RUN: %{FileCheck} --check-prefix=CHECK-INITIAL --input-file=%t.initial.out %s
15
+ #
16
+ # CHECK-INITIAL: SUBDIR-CONTENTS
17
+
18
+ client:
19
+ name: basic
20
+
21
+ targets:
22
+ "": ["subdir/"]
23
+
24
+ commands:
25
+ C.subdir-dependencies:
26
+ tool: phony
27
+ inputs: ["<subdir-contents>"]
28
+ outputs: ["subdir"]
29
+ C.subdir-contents:
30
+ tool: shell
31
+ description: SUBDIR-CONTENTS
32
+ outputs: ["<subdir-contents>"]
33
+ args: mkdir -p subdir && touch subdir/foo
You can’t perform that action at this time.
0 commit comments