{"record":{"id":"97451cc42a69c826","repo":"oracle/graal","slug":"unknown-component-name","errorCode":null,"errorMessage":"Unknown component: {name}","messagePattern":"Unknown component: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_vm.py","lineNumber":507,"sourceCode":"            _log_ignored_component(component, _prev)\n        else:\n            _log_ignored_component(_prev, component)\n    else:\n        _graalvm_components[component.short_name] = component\n        _graalvm_components_by_name[component.name] = component\n\n\ndef graalvm_component_by_name(name, fatalIfMissing=True):\n    \"\"\"\n    :rtype: GraalVmComponent\n    \"\"\"\n    if name in _graalvm_components:\n        return _graalvm_components[name]\n    elif name in _graalvm_components_by_name:\n        return _graalvm_components_by_name[name]\n    else:\n        if fatalIfMissing:\n            raise ValueError(f\"Unknown component: {name}\")\n        return None\n\ndef graalvm_components(opt_limit_to_suite=False):\n    \"\"\"\n    :rtype: list[GraalVmComponent]\n    \"\"\"\n    if opt_limit_to_suite and mx.get_opts().specific_suites:\n        return [c for c in _graalvm_components.values() if c.suite.name in mx.get_opts().specific_suites]\n    else:\n        return list(_graalvm_components.values())\n\n\ndef graalvm_home(fatalIfMissing=False):\n    import mx_sdk_vm_impl\n    return mx_sdk_vm_impl.graalvm_home(fatalIfMissing=fatalIfMissing)\n\n\ndef add_graalvm_hostvm_config(name, java_args=None, launcher_args=None, priority=0):","sourceCodeStart":489,"sourceCodeEnd":525,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_vm.py#L489-L525","documentation":"Central component registry lookup in mx_sdk_vm.py: graalvm_component_by_name() checks both the internal _graalvm_components dict and the by-name alias dict; if the name appears in neither and fatalIfMissing is true (the default), ValueError 'Unknown component: <name>' is raised.","triggerScenarios":"Any code resolving a component name that was never registered via the suite.py component declarations - typos in deps, layout entries, or command-line component selectors.","commonSituations":"Suite.py refactors that rename components; running with restricted suites so registration never happened; stale caches referencing old names.","solutions":["Fix the name: check the exact registered names by listing _graalvm_components (or the suite.py component declarations) and correct the typo.","If the component should exist, ensure the suite that declares it is loaded (remove it from --suite exclusions, run mx primary suite-wide).","Call graalvm_component_by_name(name, fatalIfMissing=False) where absence is an expected case, to get None instead of an exception."],"exampleFix":"# before\ncomp = graalvm_component_by_name('graaljs')   # actual name differs -> ValueError\n\n# after\ncomp = graalvm_component_by_name('graalvm-js')","handlingStrategy":"type-guard","validationCode":"def resolve_component(name):\n    return graalvm_component_by_name(name, fatalIfMissing=False)  # None instead of raise\n\nif resolve_component(cfg_name) is None:\n    # typo, unloaded suite, or removed component: fail with context\n    raise SystemExit(f\"unknown GraalVM component '{name}'; check suite.py registrations\")","typeGuard":"def is_known_component(name) -> bool:\n    return graalvm_component_by_name(name, fatalIfMissing=False) is not None","tryCatchPattern":"try:\n    comp = graalvm_component_by_name(name)\nexcept ValueError as e:\n    if 'Unknown component' in str(e):\n        # surface registered names / fix the typo, then retry\n        raise","preventionTips":["Validate component names against the registry before layout builds.","Use fatalIfMissing=False for optional lookups; reserve the raising form for hard requirements.","Keep component renames paired with updates to every dependent suite."],"tags":["graalvm","build","registry","configuration","mx"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}