{"record":{"id":"64fb658c994109b8","repo":"oracle/graal","slug":"e-required-by-self-name","errorCode":null,"errorMessage":"{e} (required by {self.name})","messagePattern":"(.+?) \\(required by (.+?)\\)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"sdk/mx.sdk/mx_sdk_vm.py","lineNumber":389,"sourceCode":"        assert isinstance(self.support_distributions, list)\n        assert isinstance(self.support_headers_distributions, list)\n        assert isinstance(self.support_libraries_distributions, list)\n        assert isinstance(self.license_files, list)\n        assert isinstance(self.third_party_license_files, list)\n        assert isinstance(self.provided_executables, list)\n        assert isinstance(self.boot_jars, list)\n        assert isinstance(self.jvmci_parent_jars, list)\n        assert isinstance(self.launcher_configs, list)\n        assert isinstance(self.library_configs, list)\n\n    def __str__(self):\n        return f\"{self.name} ({self.dir_name})\"\n\n    def direct_dependencies(self):\n        try:\n            return [graalvm_component_by_name(name) for name in self.dependency_names]\n        except Exception as e:\n            raise RuntimeError(f\"{e} (required by {self.name})\") from e\n\n\nclass GraalVmTruffleComponent(GraalVmComponent):\n    def __init__(self, suite, name, short_name, license_files, third_party_license_files, truffle_jars,\n                 include_in_polyglot=None, standalone_dir_name=None, standalone_dir_name_enterprise=None,\n                 standalone_dependencies=None, standalone_dependencies_enterprise=None, **kwargs):\n        \"\"\"\n        :param list[str] truffle_jars: JAR distributions that should be on the classpath for the language implementation.\n        :param bool include_in_polyglot: whether this component is included in `--language:all` or `--tool:all` and should be part of polyglot images (deprecated).\n        :param str standalone_dir_name: name for the standalone archive and directory inside\n        :param str standalone_dir_name_enterprise: like `standalone_dir_name`, but for the EE standalone. Defaults to `standalone_dir_name` if not set.\n        :param dict[str, (str, list[str])] standalone_dependencies: dict of dependent components to include in the CE standalone in the form {component name: (relative path, excluded_paths)}.\n        :param dict[str, (str, list[str])] standalone_dependencies_enterprise: like `standalone_dependencies`, but for the EE standalone. Defaults to `standalone_dependencies` if not set.\n        \"\"\"\n        super().__init__(suite, name, short_name, license_files, third_party_license_files,\n                                                      jar_distributions=truffle_jars, **kwargs)\n        if include_in_polyglot is not None:\n            mx.warn('\"include_in_polyglot\" is deprecated. Please drop all uses.')","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/sdk/mx.sdk/mx_sdk_vm.py#L371-L407","documentation":"GraalVmComponent.direct_dependencies() resolves each name in dependency_names via graalvm_component_by_name(); any failure (typically 'Unknown component: X') is re-raised as RuntimeError with the dependent component's name appended, so you know which suite component had the bad dependency.","triggerScenarios":"A component's suite.py 'deps' entry names a component that is not registered (typo, not-yet-loaded suite, or removed component) and dependency resolution runs during image layout.","commonSituations":"Renaming/removing a GraalVM component without updating dependents; running with a subset of suites (specific_suites) that excludes the suite defining the dependency; typos in dependency names.","solutions":["Read the inner message: 'Unknown component: X (required by Y)' tells you the bad name X and the component Y that declares it; fix Y's dependency_names in its suite.py.","If X should exist, make sure the suite defining it is included in the mx run (not excluded by -p/--suite restrictions).","For removed components, update or remove dependents rather than papering over the error."],"exampleFix":"# before (suite.py of component Y)\ndeps=['graalvm-llvmlanguage']   # component renamed -> RuntimeError\n\n# after (suite.py of component Y)\ndeps=['graalvm-llvm']","handlingStrategy":"try-catch","validationCode":"for dep in component.dependency_names:\n    if graalvm_component_by_name(dep, fatalIfMissing=False) is None:\n        raise SystemExit(f\"{component.name} depends on unknown component '{dep}'; fix suite.py\")","typeGuard":null,"tryCatchPattern":"try:\n    deps = component.direct_dependencies()\nexcept RuntimeError as e:\n    # message is '<inner error> (required by <component>)':\n    # fix the named component's dependency_names, then retry\n    raise","preventionTips":["After renaming or removing a GraalVM component, grep all suite.py files for its old name.","Run a dependency-name lint (resolve every dep with fatalIfMissing=False) as part of CI.","Avoid restricting suites (-p) in builds whose components have cross-suite deps."],"tags":["graalvm","build","dependencies","configuration","mx"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}