jdx/mise · error · eyre::Report

cached rustc metadata is unsupported

Error message

cached rustc metadata is unsupported

What it means

Each cached compilation stores a RustcMetadata blob; on restore it must have version 1 and kind "rustc". Any other version/kind means the metadata format (or adapter) is not understood by this build of mise, so the entry is unusable and the wrapper bails rather than misinterpreting it (src/cache/rustc.rs:306).

Source

Thrown at src/cache/rustc.rs:306

    let metadata_digest = result
        .metadata
        .ok_or_else(|| eyre::eyre!("cached rustc action result has no metadata"))?;
    let output_root_digest = result
        .output_root
        .ok_or_else(|| eyre::eyre!("cached rustc action result has no output root"))?;
    let roots = find_blobs(&[
        action.digest.clone(),
        metadata_digest.clone(),
        output_root_digest.clone(),
    ])?;
    let cached_action = read_verified_blob(&roots[0], &action.digest, "action descriptor")?;
    if cached_action != action.bytes {
        bail!("cached rustc action descriptor does not match the invocation");
    }
    let metadata: RustcMetadata =
        read_canonical_blob(&roots[1], &metadata_digest, "rustc metadata")?;
    if metadata.version != 1 || metadata.kind != "rustc" {
        bail!("cached rustc metadata is unsupported");
    }
    let directory: CacheDirectory =
        read_canonical_blob(&roots[2], &output_root_digest, "output directory")?;
    let files = validated_outputs(directory, outputs)?;
    let cached_outputs = files
        .iter()
        .map(|(node, destination)| CachedOutput {
            path: destination.clone(),
            digest: node.digest.clone(),
            mode: node.mode,
        })
        .collect();
    let restored_output_files = files.len().try_into().unwrap_or(u64::MAX);
    let restored_output_bytes = files.iter().fold(0_u64, |total, (node, _)| {
        total.saturating_add(node.digest.size)
    });

    let mut digests = vec![metadata.stdout.clone(), metadata.stderr.clone()];

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Invalidate the cache store (delete agent-side blobs/metadata) after upgrading mise
  2. Restart the agent so entries are re-recorded with the current metadata version
  3. Avoid sharing one cache store between different mise versions or adapters
Defensive patterns

Strategy: fallback

Try / catch

# Unsupported metadata version => invalidate store, recompile
grep -q 'cached rustc metadata is unsupported' build.log && {
  rm -rf "$MISE_CACHE_STAGING_DIR"; cargo build;
}

Prevention

When it happens

Trigger: Reading cache entries written by a different mise version that changed the metadata schema, or an entry recorded by a different adapter kind stored under the same digest index.

Common situations: Long-lived shared cache store across mise upgrades; CI caches restored across toolchain image updates.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/639bf1fc38f0f9a5. Report an issue: GitHub.