MCPcopy Index your code
hub / github.com/nodejs/node / CmdExport

Method CmdExport

deps/v8/tools/mb/mb.py:304–330  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

302 return self.RunGNAnalyze(vals)
303
304 def CmdExport(self):
305 self.ReadConfigFile()
306 obj = {}
307 for builder_group, builders in self.builder_groups.items():
308 obj[builder_group] = {}
309 for builder in builders:
310 config = self.builder_groups[builder_group][builder]
311 if not config:
312 continue
313
314 if isinstance(config, dict):
315 args = {k: self.FlattenConfig(v)['gn_args']
316 for k, v in config.items()}
317 elif config.startswith('//'):
318 args = config
319 else:
320 args = self.FlattenConfig(config)['gn_args']
321 if 'error' in args:
322 continue
323
324 obj[builder_group][builder] = args
325
326 # Dump object and trim trailing whitespace.
327 s = '\n'.join(l.rstrip() for l in
328 json.dumps(obj, sort_keys=True, indent=2).splitlines())
329 self.Print(s)
330 return 0
331
332 def CmdGen(self):
333 vals = self.Lookup()

Callers

nothing calls this directly

Calls 6

ReadConfigFileMethod · 0.95
FlattenConfigMethod · 0.95
PrintMethod · 0.95
itemsMethod · 0.45
joinMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected