{"record":{"id":"638f9df4d5ec7bbe","repo":"nodejs/node","slug":"unknown-mixin-s","errorCode":null,"errorMessage":"Unknown mixin \"%s\"","messagePattern":"Unknown mixin \"(.+?)\"","errorType":"exception","errorClass":"MBErr","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/mb/mb.py","lineNumber":653,"sourceCode":"  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\n  def FlattenMixins(self, mixins, vals, visited):\n    for m in mixins:\n      if m not in self.mixins:\n        raise MBErr('Unknown mixin \"%s\"' % m)\n\n      visited.append(m)\n\n      mixin_vals = self.mixins[m]\n\n      if 'cros_passthrough' in mixin_vals:\n        vals['cros_passthrough'] = mixin_vals['cros_passthrough']\n      if 'args_file' in mixin_vals:\n        if vals['args_file']:\n          raise MBErr('args_file specified multiple times in mixins '\n                      'for %s on %s' %\n                      (self.args.builder, self.args.builder_group))\n        vals['args_file'] = mixin_vals['args_file']\n      if 'gn_args' in mixin_vals:\n        if vals['gn_args']:\n          vals['gn_args'] += ' ' + mixin_vals['gn_args']\n        else:\n          vals['gn_args'] = mixin_vals['gn_args']","sourceCodeStart":635,"sourceCodeEnd":671,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/mb/mb.py#L635-L671","documentation":"During config flattening, MB walks the mixin list of a config (and recursively any nested 'mixins'). Each name must exist in the top-level `mixins` map of the mb config file. An undefined reference aborts flattening.","triggerScenarios":"A config or mixin references 'mixins': ['foo', 'bar'] where 'bar' is not declared under the config file's top-level mixins: block (includes transitively referenced mixins).","commonSituations":"Typo in a mixin name; mixin renamed/removed without updating all references; a merge that left a dangling reference; copy-paste of a config without its dependency mixins.","solutions":["Grep the mb config file for the named mixin to confirm it is undefined.","Add the missing mixin definition under the top-level mixins map.","Correct the typo in the referencing config/mixin."],"exampleFix":"// before\n'mixins': ['linux', 'relase']   // typo: 'relase'\n// after\n'mixins': ['linux', 'release']","handlingStrategy":"validation","validationCode":"# Lint the mb config: every referenced mixin must be defined.\nimport astpp  # or json if config is JSON\ncfg = load_mb_config(config_file)\nknown = set(cfg['mixins'].keys())\ndef check(mixins):\n    for m in mixins:\n        assert m in known, f\"unknown mixin {m!r}\"\n        if 'mixins' in cfg['mixins'][m]:\n            check(cfg['mixins'][m]['mixins'])\nfor name, entry in cfg['configs'].items():\n    if isinstance(entry, dict):\n        for phase, c in entry.items():\n            check(c.get('mixins', []))\n    else:\n        check(entry.get('mixins', []))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the config lint in presubmit/CI whenever mb_config files change.","When renaming/removing a mixin, grep all configs for references."],"tags":["mb","build-config","v8","config-validation"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}