jdx/mise · error · eyre::Report
cached rustc output set is incomplete
Error message
cached rustc output set is incomplete
What it means
After pairing each cached file node with an expected output by name, validated_outputs() requires that nothing expected remains unpaired (src/cache/rustc.rs:568-570). The counts already matched and every cached name was found, so leftover expected entries mean the cached set is incomplete for this invocation — reachable only through exotic name duplication or a defensive mismatch, because duplicate cached names trip the 'cached rustc output is unexpected' branch first. It is a defense-in-depth completeness check that refuses partial restores.
Source
Thrown at src/cache/rustc.rs:569
if path.parent() != Some(outputs.directory.as_path()) {
bail!("expected rustc output escapes its output directory");
}
Ok((name.to_string(), path.clone()))
})
.collect::<Result<BTreeMap<_, _>>>()?;
if directory.files.len() != expected.len() {
bail!("cached rustc output set does not match the invocation");
}
let mut files = Vec::with_capacity(directory.files.len());
for node in directory.files {
validate_file_mode(&node)?;
let destination = expected
.remove(&node.name)
.ok_or_else(|| eyre::eyre!("cached rustc output is unexpected: {}", node.name))?;
files.push((node, destination));
}
if !expected.is_empty() {
bail!("cached rustc output set is incomplete");
}
Ok(files)
}
fn compiler_identity(rustc: &OsStr) -> Result<CompilerIdentity> {
let executable = resolve_executable(rustc)?;
let environment = ["RUSTUP_HOME", "RUSTUP_TOOLCHAIN"]
.into_iter()
.map(|name| (name.into(), std::env::var(name).ok()))
.collect::<BTreeMap<_, _>>();
let responses = session::request_agent(&[AgentRequest::FindExecutableIdentity {
executable: executable.clone(),
environment: environment.clone(),
}])?;
let Some(AgentResponse::ExecutableIdentity { stdout }) = responses.into_iter().next() else {
bail!("cache agent did not return the rustc identity");
};
let stdout = if let Some(stdout) = stdout {View on GitHub (pinned to 6f52dcdf99)
Solutions
- Treat as the sibling mismatch errors: purge the cache/namespace and rebuild with one mise version
- Keep remote namespaces private and version-pinned
- Report recurring cases with the action digest — a reachable code path here indicates a writer bug worth filing
Defensive patterns
Strategy: fallback
Try / catch
Same as the count mismatch: any incompletely paired output set invalidates the whole entry — fall back to a full recompile instead of restoring a subset.
Prevention
- Purge shared caches when upgrading mise versions
- Do not hand-edit cache entries
- Report reachable occurrences upstream with the action digest — the guard firing indicates a writer-side defect
When it happens
Trigger: directory.files pairing consumed all cached names while expected entries remain: duplicate file nodes in a tampered entry, or a writer/reader version difference in how output names are derived so the pairing silently misaligns.
Common situations: Same contexts as the count mismatch: mixed-version shared caches and tampered entries.
Related errors
- cached rustc output set does not match the invocation
- remote action result does not match requested action
- cached {description} failed digest verification
- rustc produced no cacheable outputs
- rustc output is not a regular file: {}
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/d5b41a054b56e697.
Report an issue: GitHub.