jolt 0.9.76__py3-none-any.whl → 0.9.429__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. jolt/__init__.py +88 -7
  2. jolt/__main__.py +9 -1
  3. jolt/bin/fstree-darwin-x86_64 +0 -0
  4. jolt/bin/fstree-linux-x86_64 +0 -0
  5. jolt/cache.py +839 -367
  6. jolt/chroot.py +156 -0
  7. jolt/cli.py +362 -143
  8. jolt/common_pb2.py +63 -0
  9. jolt/common_pb2_grpc.py +4 -0
  10. jolt/config.py +99 -42
  11. jolt/error.py +19 -4
  12. jolt/expires.py +2 -2
  13. jolt/filesystem.py +8 -6
  14. jolt/graph.py +705 -117
  15. jolt/hooks.py +63 -1
  16. jolt/influence.py +129 -6
  17. jolt/loader.py +369 -121
  18. jolt/log.py +225 -63
  19. jolt/manifest.py +28 -38
  20. jolt/options.py +35 -10
  21. jolt/pkgs/abseil.py +42 -0
  22. jolt/pkgs/asio.py +25 -0
  23. jolt/pkgs/autoconf.py +41 -0
  24. jolt/pkgs/automake.py +41 -0
  25. jolt/pkgs/b2.py +31 -0
  26. jolt/pkgs/boost.py +111 -0
  27. jolt/pkgs/boringssl.py +32 -0
  28. jolt/pkgs/busybox.py +39 -0
  29. jolt/pkgs/bzip2.py +43 -0
  30. jolt/pkgs/cares.py +29 -0
  31. jolt/pkgs/catch2.py +36 -0
  32. jolt/pkgs/cbindgen.py +17 -0
  33. jolt/pkgs/cista.py +19 -0
  34. jolt/pkgs/clang.py +44 -0
  35. jolt/pkgs/cli11.py +23 -0
  36. jolt/pkgs/cmake.py +48 -0
  37. jolt/pkgs/cpython.py +196 -0
  38. jolt/pkgs/crun.py +29 -0
  39. jolt/pkgs/curl.py +38 -0
  40. jolt/pkgs/dbus.py +18 -0
  41. jolt/pkgs/double_conversion.py +24 -0
  42. jolt/pkgs/fastfloat.py +21 -0
  43. jolt/pkgs/ffmpeg.py +28 -0
  44. jolt/pkgs/flatbuffers.py +29 -0
  45. jolt/pkgs/fmt.py +27 -0
  46. jolt/pkgs/fstree.py +20 -0
  47. jolt/pkgs/gflags.py +18 -0
  48. jolt/pkgs/glib.py +18 -0
  49. jolt/pkgs/glog.py +25 -0
  50. jolt/pkgs/glslang.py +21 -0
  51. jolt/pkgs/golang.py +16 -11
  52. jolt/pkgs/googlebenchmark.py +18 -0
  53. jolt/pkgs/googletest.py +46 -0
  54. jolt/pkgs/gperf.py +15 -0
  55. jolt/pkgs/grpc.py +73 -0
  56. jolt/pkgs/hdf5.py +19 -0
  57. jolt/pkgs/help2man.py +14 -0
  58. jolt/pkgs/inja.py +28 -0
  59. jolt/pkgs/jsoncpp.py +31 -0
  60. jolt/pkgs/libarchive.py +43 -0
  61. jolt/pkgs/libcap.py +44 -0
  62. jolt/pkgs/libdrm.py +44 -0
  63. jolt/pkgs/libedit.py +42 -0
  64. jolt/pkgs/libevent.py +31 -0
  65. jolt/pkgs/libexpat.py +27 -0
  66. jolt/pkgs/libfastjson.py +21 -0
  67. jolt/pkgs/libffi.py +16 -0
  68. jolt/pkgs/libglvnd.py +30 -0
  69. jolt/pkgs/libogg.py +28 -0
  70. jolt/pkgs/libpciaccess.py +18 -0
  71. jolt/pkgs/libseccomp.py +21 -0
  72. jolt/pkgs/libtirpc.py +24 -0
  73. jolt/pkgs/libtool.py +42 -0
  74. jolt/pkgs/libunwind.py +35 -0
  75. jolt/pkgs/libva.py +18 -0
  76. jolt/pkgs/libvorbis.py +33 -0
  77. jolt/pkgs/libxml2.py +35 -0
  78. jolt/pkgs/libxslt.py +17 -0
  79. jolt/pkgs/libyajl.py +16 -0
  80. jolt/pkgs/llvm.py +81 -0
  81. jolt/pkgs/lua.py +54 -0
  82. jolt/pkgs/lz4.py +26 -0
  83. jolt/pkgs/m4.py +14 -0
  84. jolt/pkgs/make.py +17 -0
  85. jolt/pkgs/mesa.py +81 -0
  86. jolt/pkgs/meson.py +17 -0
  87. jolt/pkgs/mstch.py +28 -0
  88. jolt/pkgs/mysql.py +60 -0
  89. jolt/pkgs/nasm.py +49 -0
  90. jolt/pkgs/ncurses.py +30 -0
  91. jolt/pkgs/ng_log.py +25 -0
  92. jolt/pkgs/ninja.py +45 -0
  93. jolt/pkgs/nlohmann_json.py +25 -0
  94. jolt/pkgs/nodejs.py +19 -11
  95. jolt/pkgs/opencv.py +24 -0
  96. jolt/pkgs/openjdk.py +26 -0
  97. jolt/pkgs/openssl.py +103 -0
  98. jolt/pkgs/paho.py +76 -0
  99. jolt/pkgs/patchelf.py +16 -0
  100. jolt/pkgs/perl.py +42 -0
  101. jolt/pkgs/pkgconfig.py +64 -0
  102. jolt/pkgs/poco.py +39 -0
  103. jolt/pkgs/protobuf.py +77 -0
  104. jolt/pkgs/pugixml.py +27 -0
  105. jolt/pkgs/python.py +19 -0
  106. jolt/pkgs/qt.py +35 -0
  107. jolt/pkgs/rapidjson.py +26 -0
  108. jolt/pkgs/rapidyaml.py +28 -0
  109. jolt/pkgs/re2.py +30 -0
  110. jolt/pkgs/re2c.py +17 -0
  111. jolt/pkgs/readline.py +15 -0
  112. jolt/pkgs/rust.py +41 -0
  113. jolt/pkgs/sdl.py +28 -0
  114. jolt/pkgs/simdjson.py +27 -0
  115. jolt/pkgs/soci.py +46 -0
  116. jolt/pkgs/spdlog.py +29 -0
  117. jolt/pkgs/spirv_llvm.py +21 -0
  118. jolt/pkgs/spirv_tools.py +24 -0
  119. jolt/pkgs/sqlite.py +83 -0
  120. jolt/pkgs/ssl.py +12 -0
  121. jolt/pkgs/texinfo.py +15 -0
  122. jolt/pkgs/tomlplusplus.py +22 -0
  123. jolt/pkgs/wayland.py +26 -0
  124. jolt/pkgs/x11.py +58 -0
  125. jolt/pkgs/xerces_c.py +20 -0
  126. jolt/pkgs/xorg.py +360 -0
  127. jolt/pkgs/xz.py +29 -0
  128. jolt/pkgs/yamlcpp.py +30 -0
  129. jolt/pkgs/zeromq.py +47 -0
  130. jolt/pkgs/zlib.py +69 -0
  131. jolt/pkgs/zstd.py +33 -0
  132. jolt/plugins/alias.py +3 -0
  133. jolt/plugins/allure.py +5 -2
  134. jolt/plugins/autotools.py +66 -0
  135. jolt/plugins/cache.py +133 -0
  136. jolt/plugins/cmake.py +74 -6
  137. jolt/plugins/conan.py +238 -0
  138. jolt/plugins/cxx.py +698 -0
  139. jolt/plugins/cxxinfo.py +7 -0
  140. jolt/plugins/dashboard.py +1 -1
  141. jolt/plugins/docker.py +91 -23
  142. jolt/plugins/email.py +5 -2
  143. jolt/plugins/email.xslt +144 -101
  144. jolt/plugins/environ.py +11 -0
  145. jolt/plugins/fetch.py +141 -0
  146. jolt/plugins/gdb.py +44 -21
  147. jolt/plugins/gerrit.py +1 -14
  148. jolt/plugins/git.py +316 -101
  149. jolt/plugins/googletest.py +522 -1
  150. jolt/plugins/http.py +36 -38
  151. jolt/plugins/libtool.py +63 -0
  152. jolt/plugins/linux.py +990 -0
  153. jolt/plugins/logstash.py +4 -4
  154. jolt/plugins/meson.py +61 -0
  155. jolt/plugins/ninja-compdb.py +107 -31
  156. jolt/plugins/ninja.py +929 -134
  157. jolt/plugins/paths.py +11 -1
  158. jolt/plugins/pkgconfig.py +219 -0
  159. jolt/plugins/podman.py +148 -91
  160. jolt/plugins/python.py +137 -0
  161. jolt/plugins/remote_execution/__init__.py +0 -0
  162. jolt/plugins/remote_execution/administration_pb2.py +46 -0
  163. jolt/plugins/remote_execution/administration_pb2_grpc.py +170 -0
  164. jolt/plugins/remote_execution/log_pb2.py +32 -0
  165. jolt/plugins/remote_execution/log_pb2_grpc.py +68 -0
  166. jolt/plugins/remote_execution/scheduler_pb2.py +41 -0
  167. jolt/plugins/remote_execution/scheduler_pb2_grpc.py +141 -0
  168. jolt/plugins/remote_execution/worker_pb2.py +38 -0
  169. jolt/plugins/remote_execution/worker_pb2_grpc.py +112 -0
  170. jolt/plugins/report.py +12 -2
  171. jolt/plugins/rust.py +25 -0
  172. jolt/plugins/scheduler.py +710 -0
  173. jolt/plugins/selfdeploy/setup.py +9 -4
  174. jolt/plugins/selfdeploy.py +138 -88
  175. jolt/plugins/strings.py +35 -22
  176. jolt/plugins/symlinks.py +26 -11
  177. jolt/plugins/telemetry.py +5 -2
  178. jolt/plugins/timeline.py +13 -3
  179. jolt/plugins/volume.py +46 -48
  180. jolt/scheduler.py +591 -191
  181. jolt/tasks.py +1783 -245
  182. jolt/templates/export.sh.template +12 -6
  183. jolt/templates/timeline.html.template +44 -47
  184. jolt/timer.py +22 -0
  185. jolt/tools.py +749 -302
  186. jolt/utils.py +245 -18
  187. jolt/version.py +1 -1
  188. jolt/version_utils.py +2 -2
  189. jolt/xmldom.py +12 -2
  190. {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/METADATA +98 -38
  191. jolt-0.9.429.dist-info/RECORD +207 -0
  192. {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/WHEEL +1 -1
  193. jolt/plugins/amqp.py +0 -834
  194. jolt/plugins/debian.py +0 -338
  195. jolt/plugins/ftp.py +0 -181
  196. jolt/plugins/ninja-cache.py +0 -64
  197. jolt/plugins/ninjacli.py +0 -271
  198. jolt/plugins/repo.py +0 -253
  199. jolt-0.9.76.dist-info/RECORD +0 -79
  200. {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/entry_points.txt +0 -0
  201. {jolt-0.9.76.dist-info → jolt-0.9.429.dist-info}/top_level.txt +0 -0
jolt/plugins/logstash.py CHANGED
@@ -13,9 +13,9 @@ log.verbose("[LogStash] Loaded")
13
13
 
14
14
  class LogStashHooks(TaskHook):
15
15
  def __init__(self):
16
- self._uri = config.get("logstash", "http.uri")
16
+ self._uri = config.get("logstash", "http.uri", "http://logstash")
17
17
  self._failed_enabled = config.getboolean("logstash", "failed", False)
18
- self._finished_enabled = config.getboolean("logstash", "finished", False)
18
+ self._finished_enabled = config.getboolean("logstash", "passed", config.getboolean("logstash", "finished", False))
19
19
  raise_error_if(not self._uri, "logstash.http.uri not configured")
20
20
 
21
21
  def _get_uri(self, task):
@@ -25,8 +25,8 @@ class LogStashHooks(TaskHook):
25
25
  task.canonical_name)
26
26
 
27
27
  def _stash_log(self, task, logbuffer):
28
- with task.tools.tmpdir("logstash") as t:
29
- filepath = fs.path.join(t.path, "log")
28
+ with task.tools.tmpdir("logstash") as tmp:
29
+ filepath = fs.path.join(tmp, "log")
30
30
  with open(filepath, "w") as f:
31
31
  f.write(logbuffer)
32
32
  task.logstash = self._get_uri(task)
jolt/plugins/meson.py ADDED
@@ -0,0 +1,61 @@
1
+ from jolt import Task, attributes
2
+
3
+
4
+ @attributes.common_metadata()
5
+ class Meson(Task):
6
+ """ Base class for Meson-based build tasks. """
7
+
8
+ abstract = True
9
+ """ This is an abstract base class that should be inherited by concrete tasks. """
10
+
11
+ incremental = True
12
+ """
13
+ Whether to use incremental builds.
14
+ If True, the build directories are preserved between runs.
15
+ """
16
+
17
+ options = []
18
+ """
19
+ Additional options to pass to the `meson` command.
20
+ """
21
+
22
+ srcdir = None
23
+ """
24
+ Source directory for the Meson project.
25
+
26
+ If None, defaults to the task work directory (joltdir).
27
+ """
28
+
29
+ def clean(self, tools):
30
+ at = tools.meson(incremental=self.incremental)
31
+ at.clean()
32
+
33
+ def run(self, deps, tools):
34
+ self.deps = deps
35
+ options = tools.expand(self.options)
36
+ at = tools.meson(deps, incremental=self.incremental)
37
+ at.configure(self.srcdir or self.joltdir, *options)
38
+ at.build()
39
+ at.install()
40
+
41
+ def publish(self, artifact, tools):
42
+ at = tools.meson(incremental=self.incremental)
43
+ at.publish(artifact)
44
+
45
+
46
+ def requires(meson=True, ninja=True):
47
+ """ Decorator to add Meson and Ninja requirements to a task. """
48
+
49
+ import jolt.pkgs.meson
50
+ import jolt.pkgs.ninja
51
+
52
+ def decorate(cls):
53
+ if meson:
54
+ cls = attributes.requires("requires_meson")(cls)
55
+ cls.requires_meson = ["meson"]
56
+ if ninja:
57
+ cls = attributes.requires("requires_ninja")(cls)
58
+ cls.requires_ninja = ["ninja"]
59
+ return cls
60
+
61
+ return decorate
@@ -30,7 +30,7 @@ def patch(command, attrib, search, replace):
30
30
 
31
31
 
32
32
  class CompDB(object):
33
- def __init__(self, path="compile_commands.json", artifact=None):
33
+ def __init__(self, path="compdb/compile_commands.json", artifact=None):
34
34
  self.commands = []
35
35
  self.attribs = {}
36
36
  if artifact:
@@ -73,6 +73,12 @@ class CompDB(object):
73
73
  utils.call_and_catch(patch, command, "command", "sandboxes/", "sandboxes-reflected/")
74
74
  utils.call_and_catch(patch, command, "directory", self.attribs.get("joltdir", joltdir()), joltdir())
75
75
 
76
+ def remove_wrappers(self, task):
77
+ for command in self.commands:
78
+ for wrapper in [task.tools.getenv("CXXWRAP", ""), task.tools.getenv("CCWRAP", "")]:
79
+ if command["command"].startswith(wrapper):
80
+ command["command"] = command["command"][len(wrapper):]
81
+
76
82
  def merge(self, db):
77
83
  self.commands.extend(db.commands)
78
84
 
@@ -83,62 +89,110 @@ def has_incpaths(artifact):
83
89
 
84
90
  def stage_artifacts(artifacts, tools):
85
91
  for artifact in filter(has_incpaths, artifacts):
86
- tools.sandbox(artifact, incremental=True, reflect=fs.has_symlinks())
92
+ tools.sandbox(artifact, incremental=True)
93
+ if fs.has_symlinks:
94
+ tools.sandbox(artifact, incremental=True, reflect=True)
95
+
96
+
97
+ def get_compdb_artifacts(task):
98
+ artifacts = []
99
+
100
+ def select_compdb(artifacts):
101
+ return list(filter(lambda a: a.name == "compdb", artifacts))
102
+
103
+ for dep in task.children:
104
+ artifacts.extend(dep.artifacts)
105
+ return select_compdb(task.artifacts)[0], select_compdb(artifacts)
87
106
 
88
107
 
89
- def get_task_artifacts(task, artifact=None):
90
- acache = cache.ArtifactCache.get()
91
- artifact = artifact or acache.get_artifact(task)
92
- return artifact, [acache.get_artifact(dep) for dep in task.children]
108
+ def get_task_artifacts(task):
109
+ compdb_artifact = task.get_artifact("compdb")
110
+ artifacts = [a for a in task.artifacts]
111
+ for dep in task.children:
112
+ artifacts.extend(dep.artifacts)
113
+ return compdb_artifact, artifacts
93
114
 
94
115
 
95
116
  class CompDBHooks(TaskHook):
117
+ def __init__(self):
118
+ self._depfiles = config.getboolean("ninja-compdb", "depfiles", False)
119
+
120
+ def publish_compdb(self, artifact, tools):
121
+ with tools.cwd(self.outdir):
122
+ artifact.collect("**/*compile_commands.json", "compdb/")
123
+
124
+ def publish_depfiles(self, artifact, tools):
125
+ with tools.cwd(self.outdir):
126
+ artifact.collect("**/*.d", "depfiles/")
127
+
96
128
  def task_created(self, task):
97
129
  task.task.influence.append(StringInfluence("NinjaCompDB: v3"))
130
+ if isinstance(task.task, ninja.CXXProject):
131
+ compdb_artifact = task.cache.get_artifact(task, "compdb")
132
+ task.add_artifact(compdb_artifact)
133
+ publish_compdb = getattr(task.task, "publish_compdb", None)
134
+ if not publish_compdb:
135
+ setattr(task.task, "publish_compdb", CompDBHooks.publish_compdb.__get__(task.task, task.task.__class__))
136
+ if self._depfiles:
137
+ depfile_artifact = task.cache.get_artifact(task, "depfiles")
138
+ task.add_artifact(depfile_artifact)
139
+ publish_depfiles = getattr(task.task, "publish_depfiles", None)
140
+ if not publish_depfiles:
141
+ setattr(task.task, "publish_depfiles", CompDBHooks.publish_depfiles.__get__(task.task, task.task.__class__))
98
142
 
99
143
  def task_postrun(self, task, deps, tools):
100
144
  if not isinstance(task.task, ninja.CXXProject):
101
145
  return
102
- with tools.cwd(task.task.outdir):
103
- utils.call_and_catch(tools.run, "ninja -f build.ninja -t compdb > compile_commands.json")
146
+ with tools.cwd(tools.wsroot):
147
+ utils.call_and_catch(tools.run, "ninja -f {outdir}/build.ninja -t compdb > {outdir}/compile_commands.json")
104
148
 
105
149
  def task_postpublish(self, task, artifact, tools):
106
- if isinstance(task.task, ninja.CXXProject):
107
- with tools.cwd(task.task.outdir):
108
- artifact.collect("*compile_commands.json")
150
+ if artifact.name != "compdb":
151
+ return
109
152
 
110
153
  # Add information about the workspace and cachedir roots
111
154
  db = CompDB(artifact=artifact)
112
155
  db.read()
113
156
  db.annotate(task)
157
+ db.remove_wrappers(task)
114
158
  db.write()
115
159
 
116
160
  if isinstance(task.task, ninja.CXXProject):
117
161
  dbpath = fs.path.join(task.task.outdir, "all_compile_commands.json")
118
- _, deps = get_task_artifacts(task, artifact)
162
+ _, deps = get_compdb_artifacts(task)
119
163
  db = CompDB(dbpath)
120
164
  for dep in [artifact] + deps:
121
165
  depdb = CompDB(artifact=dep)
122
166
  depdb.read()
123
- depdb.relocate(task)
167
+ depdb.relocate(task, sandboxes=fs.has_symlinks())
124
168
  db.merge(depdb)
125
169
  db.write()
126
- artifact.collect(dbpath, flatten=True)
170
+ artifact.collect(dbpath, "compdb/", flatten=True)
127
171
 
128
- def task_finished_execution(self, task):
172
+ def task_finished_execution(self, task: graph.TaskProxy):
129
173
  if task.options.network or task.options.worker:
130
174
  return
131
175
  if not task.is_goal():
132
176
  return
133
177
  if isinstance(task.task, ninja.CXXProject):
134
- artifact, deps = get_task_artifacts(task)
135
- db = CompDB("all_compile_commands.json", artifact)
178
+ artifact, deps = get_compdb_artifacts(task)
179
+ db = CompDB("compdb/all_compile_commands.json", artifact)
136
180
  db.read()
137
- db.relocate(task)
181
+ db.relocate(task, sandboxes=fs.has_symlinks())
138
182
  outdir = task.tools.builddir("compdb", incremental=True)
139
183
  dbpath = fs.path.join(outdir, "all_compile_commands.json")
140
184
  db.write(dbpath, force=True)
141
- stage_artifacts(deps + [artifact], task.tools)
185
+
186
+ # Save the compilation database to the configured path
187
+ if task.is_goal():
188
+ last_path = config.get("ninja-compdb", "path")
189
+ if last_path:
190
+ last_path = os.path.join(task.tools.wsroot, last_path)
191
+ task.tools.mkdirname(last_path)
192
+ db.write(last_path, force=True)
193
+
194
+ artifact, deps = get_task_artifacts(task)
195
+ stage_artifacts(deps, task.tools)
142
196
 
143
197
  def task_finished_download(self, task):
144
198
  self.task_finished_execution(task)
@@ -172,54 +226,76 @@ def compdb(ctx, task, default):
172
226
 
173
227
  """
174
228
 
175
- manifest = ctx.obj["manifest"]
176
229
  options = JoltOptions(default=default)
177
230
  acache = cache.ArtifactCache.get(options)
178
231
  TaskHookRegistry.get(options)
179
232
  executors = scheduler.ExecutorRegistry.get(options)
180
233
  registry = TaskRegistry.get()
181
234
  strategy = scheduler.DownloadStrategy(executors, acache)
182
- queue = scheduler.TaskQueue(strategy)
235
+ queue = scheduler.TaskQueue()
183
236
 
184
237
  for params in default:
185
238
  registry.set_default_parameters(params)
186
239
 
187
- gb = graph.GraphBuilder(registry, manifest, options, progress=True)
240
+ gb = graph.GraphBuilder(registry, acache, options, progress=True)
188
241
  dag = gb.build(task)
189
242
 
190
243
  try:
191
- with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as p:
192
- while dag.has_tasks():
193
- leafs = dag.select(lambda graph, task: task.is_ready())
244
+ with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as progress:
245
+ in_progress = set()
246
+
247
+ while dag.has_tasks() or not queue.empty():
248
+ leafs = dag.select(lambda graph, task: task.is_ready() and task not in in_progress)
194
249
 
195
250
  # Order the tasks by their weights to improve build times
196
251
  leafs.sort(key=lambda x: x.weight)
197
252
 
198
253
  while leafs:
199
254
  task = leafs.pop()
200
- queue.submit(acache, task)
255
+ executor = strategy.create_executor({}, task)
256
+ queue.submit(executor)
257
+ in_progress.add(task)
258
+
259
+ task, _ = queue.wait()
260
+
261
+ # Materialize workspace resources so that
262
+ # source code is available to the debugger.
263
+ if task.is_workspace_resource():
264
+ task.task.acquire_ws(force=True)
201
265
 
202
- task, error = queue.wait()
203
- p.update(1)
266
+ # Unpack the task if it is not a resource task and has a custom unpack method
267
+ if not task.is_resource():
268
+ if task.is_unpackable():
269
+ task.unpack()
270
+
271
+ progress.update(1)
204
272
 
205
273
  except KeyboardInterrupt:
206
274
  print()
207
275
  log.warning("Interrupted by user")
208
276
  try:
209
277
  queue.abort()
278
+ executors.shutdown()
210
279
  sys.exit(1)
211
280
  except KeyboardInterrupt:
212
281
  print()
213
282
  log.warning("Interrupted again, exiting")
214
283
  os._exit(1)
215
284
 
285
+ finally:
286
+ queue.shutdown()
287
+
216
288
  for goal in dag.goals:
217
- artifact, deps = get_task_artifacts(goal)
218
- db = CompDB("all_compile_commands.json", artifact)
289
+ if goal.is_resource():
290
+ continue
291
+ if goal.is_alias():
292
+ continue
293
+ compdb_artifact, artifacts = get_task_artifacts(goal)
294
+ db = CompDB("compdb/all_compile_commands.json", compdb_artifact)
219
295
  db.read()
220
296
  db.relocate(goal, sandboxes=fs.has_symlinks())
221
297
  outdir = goal.tools.builddir("compdb", incremental=True)
222
298
  dbpath = fs.path.join(outdir, "all_compile_commands.json")
223
299
  db.write(dbpath, force=True)
224
- stage_artifacts(deps + [artifact], goal.tools)
300
+ stage_artifacts(artifacts, goal.tools)
225
301
  log.info("Compilation DB: {}", dbpath)