MCPcopy Create free account
hub / github.com/nodejs/node / DeepDependencyTargets

Function DeepDependencyTargets

tools/gyp/pylib/gyp/common.py:294–310  ·  view source on GitHub ↗

Returns the recursive list of target dependencies.

(target_dicts, roots)

Source from the content-addressed store, hash-verified

292
293
294def DeepDependencyTargets(target_dicts, roots):
295 """Returns the recursive list of target dependencies."""
296 dependencies = set()
297 pending = set(roots)
298 while pending:
299 # Pluck out one.
300 r = pending.pop()
301 # Skip if visited already.
302 if r in dependencies:
303 continue
304 # Add it.
305 dependencies.add(r)
306 # Add its children.
307 spec = target_dicts[r]
308 pending.update(set(spec.get("dependencies", [])))
309 pending.update(set(spec.get("dependencies_original", [])))
310 return list(dependencies - set(roots))
311
312
313def BuildFileTargets(target_list, build_file):

Callers 1

AllTargetsFunction · 0.85

Calls 6

popMethod · 0.80
addMethod · 0.65
updateMethod · 0.65
getMethod · 0.65
setFunction · 0.50
listFunction · 0.50

Tested by

no test coverage detected