{"record":{"id":"cfdbea017d411fcb","repo":"nodejs/node","slug":"must-not-specify-a-build-phase-for-s-on-s","errorCode":null,"errorMessage":"Must not specify a build --phase for %s on %s","messagePattern":"Must not specify a build --phase for (.+?) on (.+?)","errorType":"exception","errorClass":"MBErr","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/mb/mb.py","lineNumber":631,"sourceCode":"        self.args.builder, self.builder_groups[self.args.builder_group])\n\n    if not config:\n      raise MBErr(\n        'Builder name \"%s\"  not found under builder_groups[%s] in \"%s\"' %\n        (self.args.builder, self.args.builder_group, self.args.config_file))\n\n    if isinstance(config, dict):\n      if self.args.phase is None:\n        raise MBErr('Must specify a build --phase for %s on %s' %\n                    (self.args.builder, self.args.builder_group))\n      phase = str(self.args.phase)\n      if phase not in config:\n        raise MBErr('Phase %s doesn\\'t exist for %s on %s' %\n                    (phase, self.args.builder, self.args.builder_group))\n      return config[phase]\n\n    if self.args.phase is not None:\n      raise MBErr('Must not specify a build --phase for %s on %s' %\n                  (self.args.builder, self.args.builder_group))\n    return config\n\n  def FlattenConfig(self, config):\n    mixins = self.configs[config]\n    vals = self.DefaultVals()\n\n    visited = []\n    self.FlattenMixins(mixins, vals, visited)\n    return vals\n\n  def DefaultVals(self):\n    return {\n      'args_file': '',\n      'cros_passthrough': False,\n      'gn_args': '',\n    }\n","sourceCodeStart":613,"sourceCodeEnd":649,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/mb/mb.py#L613-L649","documentation":"Inverse of the phased-config case: the resolved builder config is a flat string (single-phase), but the caller passed --phase. MB rejects the flag because there is no phase dict to index into.","triggerScenarios":"Invoking `mb.py <subcmd> -m <group> -b <builder> --phase <X>` where builder_groups[group][builder] is a plain string rather than a dict.","commonSituations":"Copy-pasting a phased invocation against a non-phased builder; recipe not updated after a builder was de-phased; leftover --phase flag in a wrapper script.","solutions":["Drop the --phase argument from the MB invocation.","If phases are genuinely needed, migrate the builder's config entry to a phased dict in the mb config file."],"exampleFix":"// before\nv8/tools/mb/mb.py gen -m client.v8 -b 'V8 Linux' --phase x64\n// after\nv8/tools/mb/mb.py gen -m client.v8 -b 'V8 Linux'","handlingStrategy":"validation","validationCode":"config = resolve_builder_config(builder_group, builder)\nif not isinstance(config, dict):\n    assert phase is None, (\n        f\"builder {builder!r} is not phased; --phase must be omitted\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Decide phase usage from the resolved config shape, not from a hardcoded flag.","Keep wrapper scripts in sync when a builder is de-phased."],"tags":["mb","build-config","v8","gn"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}