rust-lang/rust · error · anyhow::Error
missing component from manifest: {}
Error message
missing component from manifest: {} What it means
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.
Source
Thrown at src/tools/bump-stage0/src/main.rs:189
Ok(Some(VersionMetadata {
channel_manifest_hash: manifest_hash,
git_commit_hash: manifest.pkg["rust"]
.git_commit_hash
.as_ref()
.expect("invalid git_commit_hash")
.into(),
date: manifest.date,
version: "nightly".into(),
}))
}
fn collect_checksums(&mut self, manifest: &Manifest, components: &[&str]) -> Result<(), Error> {
let prefix = format!("{}/", self.config.dist_server);
for component in components {
let pkg = manifest
.pkg
.get(*component)
.ok_or_else(|| anyhow::anyhow!("missing component from manifest: {}", component))?;
for target in pkg.target.values() {
for pair in &[(&target.url, &target.hash), (&target.xz_url, &target.xz_hash)] {
if let (Some(url), Some(sha256)) = pair {
let url = url
.strip_prefix(&prefix)
.ok_or_else(|| {
anyhow::anyhow!("url doesn't start with dist server base: {}", url)
})?
.to_string();
self.checksums.insert(url, sha256.clone());
}
}
}
}
for artifact in manifest.artifacts.values() {
for targets in artifact.target.values() {
for target in targets {
let url = targetView on GitHub (pinned to 7088e4b63a)
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.
Example fix
// before const COMPILER_COMPONENTS: &[&str] = &["rustc", "rust-std", "cargo", "clippy-preview", "rustfmt-preview"]; // error: missing component from manifest: rustfmt-preview (on beta/stable) // after (rustfmt is nightly-only; do not request it unconditionally) const COMPILER_COMPONENTS: &[&str] = &["rustc", "rust-std", "cargo", "clippy-preview"];
Defensive patterns
Strategy: validation
Validate before calling
// Before collect_checksums, verify each requested component exists in the manifest.
for component in components {
if !manifest.pkg.contains_key(*component) {
eprintln!("Manifest for channel/date lacks component '{component}'; skipping or aborting");
}
} Try / catch
if let Err(e) = tool.collect_checksums(&manifest, components) {
if e.to_string().starts_with("missing component from manifest") {
eprintln!("{e:#}. Check the channel manifest contents and the component list.");
}
return Err(e);
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- unsupported channel: {}
- url doesn't start with dist server base: {}
- failed to parse version
- rust-analyzer Language Server is not available. Please, ensu
- Failed to execute ${path} --version.
AI-assisted analysis of rust-lang/rust@7088e4b63a (2026-08-10).
Data as JSON: /api/errors/59e76ba355c4663e.
Report an issue: GitHub.