{"record":{"id":"59e76ba355c4663e","repo":"rust-lang/rust","slug":"missing-component-from-manifest","errorCode":null,"errorMessage":"missing component from manifest: {}","messagePattern":"missing component from manifest: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/tools/bump-stage0/src/main.rs","lineNumber":189,"sourceCode":"        Ok(Some(VersionMetadata {\n            channel_manifest_hash: manifest_hash,\n            git_commit_hash: manifest.pkg[\"rust\"]\n                .git_commit_hash\n                .as_ref()\n                .expect(\"invalid git_commit_hash\")\n                .into(),\n            date: manifest.date,\n            version: \"nightly\".into(),\n        }))\n    }\n\n    fn collect_checksums(&mut self, manifest: &Manifest, components: &[&str]) -> Result<(), Error> {\n        let prefix = format!(\"{}/\", self.config.dist_server);\n        for component in components {\n            let pkg = manifest\n                .pkg\n                .get(*component)\n                .ok_or_else(|| anyhow::anyhow!(\"missing component from manifest: {}\", component))?;\n            for target in pkg.target.values() {\n                for pair in &[(&target.url, &target.hash), (&target.xz_url, &target.xz_hash)] {\n                    if let (Some(url), Some(sha256)) = pair {\n                        let url = url\n                            .strip_prefix(&prefix)\n                            .ok_or_else(|| {\n                                anyhow::anyhow!(\"url doesn't start with dist server base: {}\", url)\n                            })?\n                            .to_string();\n                        self.checksums.insert(url, sha256.clone());\n                    }\n                }\n            }\n        }\n        for artifact in manifest.artifacts.values() {\n            for targets in artifact.target.values() {\n                for target in targets {\n                    let url = target","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/rust-lang/rust/blob/7088e4b63a9516ebfbfe2ab2d999cf01a528ac14/src/tools/bump-stage0/src/main.rs#L171-L207","documentation":"Thrown by collect_checksums in bump-stage0 when a required component name (from COMPILER_COMPONENTS or RUSTFMT_COMPONENTS) is absent from the fetched channel manifest's pkg map. Each component (rustc, rust-std, cargo, clippy-preview, rustfmt-preview) is expected to have an entry whose checksums are recorded into stage0.","triggerScenarios":"The upstream channel manifest for the target date/channel omits a component that bump-stage0 still requests; the component was renamed in the manifest but not in the COMPILER_COMPONENTS/RUSTFMT_COMPONENTS constants; a stale/old date manifest predates a component.","commonSituations":"Running bump-stage0 against a nightly date before rustfmt-preview existed; a component renamed in the dist manifest; manifest fetch returned a partial/wrong-channel document.","solutions":["Open the channel manifest URL (printed/logged by fetch_manifest) and check which component names it actually contains.","If a component was renamed upstream, update the COMPILER_COMPONENTS or RUSTFMT_COMPONENTS constant to the new name.","If the component genuinely should be optional for this channel, gate its inclusion behind a channel check (as detect_rustfmt already does for rustfmt).","Verify the date passed to fetch_manifest is correct and the manifest is not for a different channel."],"exampleFix":"// before\nconst COMPILER_COMPONENTS: &[&str] = &[\"rustc\", \"rust-std\", \"cargo\", \"clippy-preview\", \"rustfmt-preview\"];\n// error: missing component from manifest: rustfmt-preview (on beta/stable)\n\n// after (rustfmt is nightly-only; do not request it unconditionally)\nconst COMPILER_COMPONENTS: &[&str] = &[\"rustc\", \"rust-std\", \"cargo\", \"clippy-preview\"];","handlingStrategy":"validation","validationCode":"// Before collect_checksums, verify each requested component exists in the manifest.\nfor component in components {\n    if !manifest.pkg.contains_key(*component) {\n        eprintln!(\"Manifest for channel/date lacks component '{component}'; skipping or aborting\");\n    }\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = tool.collect_checksums(&manifest, components) {\n    if e.to_string().starts_with(\"missing component from manifest\") {\n        eprintln!(\"{e:#}. Check the channel manifest contents and the component list.\");\n    }\n    return Err(e);\n}","preventionTips":["Keep COMPILER_COMPONENTS/RUSTFMT_COMPONENTS in sync with the manifest schema.","Gate channel-specific components (like rustfmt) behind channel checks.","Fetch the manifest and inspect pkg keys when adding a new component."],"tags":["bump-stage0","manifest","release-channel","configuration"],"backgroundTag":null,"analyzedSha":"7088e4b63a9516ebfbfe2ab2d999cf01a528ac14","analyzedAt":"2026-08-10T14:17:03.603Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}