jdx/mise · warning · eyre::Report
rustc produced no cacheable outputs
Error message
rustc produced no cacheable outputs
What it means
publish_result() refuses to store an action with an empty outputs list (src/cache/rustc.rs:751-753): with nothing to restore, publishing stdout/stderr alone would be pointless. In the normal flow the caller passes emitted files plus the dep-info file (src/cache/rustc.rs:105-107), so this fires only for invocations that produced no expected artifacts at all. Publication errors are caught by compile() and downgraded to 'mise rustc cache warning: result was not stored' (src/cache/rustc.rs:111-113).
Source
Thrown at src/cache/rustc.rs:752
if executable.is_absolute() {
return Ok(executable);
}
which::which(&executable).wrap_err_with(|| {
format!(
"failed to resolve compiler executable {}",
executable.display()
)
})
}
fn publish_result(
action: &CacheDigest,
action_bytes: &[u8],
outputs: &[PathBuf],
output: &Output,
) -> Result<()> {
if outputs.is_empty() {
bail!("rustc produced no cacheable outputs");
}
let staging = staging_directory()?;
let mut blobs = vec![staged_bytes(staging.path(), "action.json", action_bytes)?];
let stdout = staged_bytes(staging.path(), "stdout", &output.stdout)?;
let stderr = staged_bytes(staging.path(), "stderr", &output.stderr)?;
blobs.extend([stdout.clone(), stderr.clone()]);
let mut files = Vec::with_capacity(outputs.len());
for path in outputs {
let metadata = std::fs::metadata(path)
.wrap_err_with(|| format!("failed to inspect rustc output {}", path.display()))?;
if !metadata.is_file() {
bail!("rustc output is not a regular file: {}", path.display());
}
let digest = CacheDigest::blake3_file(path)?;
blobs.push((digest.clone(), path.clone()));
files.push(CacheFileNode {
digest,View on GitHub (pinned to 6f52dcdf99)
Solutions
- Ignore it: the build still succeeds, only this invocation is not cached
- If it spams output for a task that never has artifacts, disable the rust cache for that task
- If normal cargo builds hit it, capture the rustc command line and report it — outputs parsing should have found the dep-info file
Defensive patterns
Strategy: fallback
Try / catch
Treat publication as best-effort exactly as compile() does: `if let Err(error) = publication { eprintln!("mise rustc cache warning: result was not stored: {error:#}"); }` — the compile result is already on disk and must be returned regardless. Prevention
- Expect metadata-only invocations to be uncached; filter them into tasks with the rust cache disabled
- Do not build tooling that depends on every rustc invocation being cached
When it happens
Trigger: A successful rustc invocation reaching the publish path with an empty parsed output set: type-check-only or probing invocations with no -o/--emit artifacts, or a regression in RustcInvocation::outputs parsing that yields no files.
Common situations: Rare defensive guard; direct rustc calls with no emitted artifacts; tooling that wraps rustc for metadata-only queries inside a cached task.
Related errors
- rustc output is not a regular file: {}
- cached rustc output set does not match the invocation
- cached rustc output set is incomplete
- cache agent returned an unexpected publish response
- cached rustc action is missing blob {}
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/9fc69b834ebd2c96.
Report an issue: GitHub.