{"record":{"id":"a12a3f8f5edfda13","repo":"nodejs/node","slug":"can-not-specific-both-c-config-and-m-builder","errorCode":null,"errorMessage":"Can not specific both -c/--config and -m/--builder-group or -b/--builder","messagePattern":"Can not specific both -c/--config and -m/--builder-group or -b/--builder","errorType":"exception","errorClass":"MBErr","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/mb/mb.py","lineNumber":598,"sourceCode":"    isolate_maps = {}\n    for isolate_map in self.args.isolate_map_files:\n      try:\n        isolate_map = ast.literal_eval(self.ReadFile(isolate_map))\n        duplicates = set(isolate_map).intersection(isolate_maps)\n        if duplicates:\n          raise MBErr(\n              'Duplicate targets in isolate map files: %s.' %\n              ', '.join(duplicates))\n        isolate_maps.update(isolate_map)\n      except SyntaxError as e:\n        raise MBErr('Failed to parse isolate map file \"%s\": %s' %\n                    (isolate_map, e)) from e\n    return isolate_maps\n\n  def ConfigFromArgs(self):\n    if self.args.config:\n      if self.args.builder_group or self.args.builder:\n        raise MBErr(\n          'Can not specific both -c/--config and -m/--builder-group or '\n          '-b/--builder')\n\n      return self.args.config\n\n    if not self.args.builder_group or not self.args.builder:\n      raise MBErr('Must specify either -c/--config or '\n                  '(-m/--builder-group and -b/--builder)')\n\n    if not self.args.builder_group in self.builder_groups:\n      raise MBErr('Builder groups name \"%s\" not found in \"%s\"' %\n                  (self.args.builder_group, self.args.config_file))\n\n    config = _v8_builder_fallback(\n        self.args.builder, self.builder_groups[self.args.builder_group])\n\n    if not config:\n      raise MBErr(","sourceCodeStart":580,"sourceCodeEnd":616,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/mb/mb.py#L580-L616","documentation":"ConfigFromArgs() enforces mutual exclusivity: if -c/--config is given together with -m/--builder-group OR -b/--builder, it raises MBErr. A config can be specified either by name (-c) or by (builder_group, builder) pair, not both. (Note the message typo 'specific' for 'specify' is in the upstream source.)","triggerScenarios":"A command line such as `mb.py gen -c x64.release -m tryserver.v8 -b \"V8 Linux\" out/Default` sets both -c and (-m or -b), tripping the guard at the top of ConfigFromArgs().","commonSituations":"Copy-pasting a CI command that used -m/-b and adding -c; wrapping mb.py in a script that always passes all flags; misunderstanding that -c and -m/-b are alternative selection modes.","solutions":["Choose one selection mode: either `-c <config>` alone, or `-m <group> -b <builder>` together — drop the other flags.","Audit the wrapper script / CI recipe to pass only the selection flags appropriate to the mode."],"exampleFix":"// before\n  mb.py gen -c x64.release -m tryserver.v8 -b \"V8 Linux\" out/Default\n// after\n  mb.py gen -c x64.release out/Default","handlingStrategy":"validation","validationCode":"if args.config and (args.builder_group or args.builder):\n    sys.exit('Pass either -c/--config OR (-m/--builder-group and -b/--builder), not both')","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Decide selection mode upfront: named config (-c) vs builder pair (-m -b); never mix.","In wrapper scripts, branch on mode and pass only the relevant flags.","Document the mutual exclusivity next to the mb invocation in CI recipes."],"tags":["mb","args","mutual-exclusion","v8-build"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}