sccache crashes with a fatal error when compiling a crate whose dep-info includes subdirectory paths registered via the unstable, nightly-only proc_macro::tracked::path() API. The same build is successful when run via cargo +nightly build.
Error
sccache: encountered fatal error
sccache: error: failed to read from file `/private/tmp/dir-simple/data`: Is a directory (os error 21)
sccache: caused by: failed to read from file `/private/tmp/dir-simple/data`: Is a directory (os error 21)
error: could not compile `sccache-repro` (lib)
Environment
sccache 0.14.0
rustc 1.94.0-nightly (22c74ba91 2026-01-15)
Minimal reproduction
The repro uses a fork of include_dir. The only difference from the crates.io 0.7.4 release is that the unstable API names are updated to match current nightly.
Note that I was unable to reproduce it with a single directory level.
Setup
Cargo.toml:
[package]
name = "sccache-repro"
version = "0.1.0"
edition = "2021"
[dependencies]
include_dir = { git = "https://github.com/vercel-labs/include_dir", branch = "turbopack", features = ["nightly"] }
src/lib.rs:
use include_dir::{include_dir, Dir};
pub static DATA: Dir<'_> = include_dir!("$CARGO_MANIFEST_DIR/data");
Create fixture files:
mkdir -p data/subdir
echo "hello" > data/file1.txt
echo "world" > data/subdir/file2.txt
To run:
RUSTC_WRAPPER=sccache cargo +nightly build
sccache crashes with a fatal error when compiling a crate whose dep-info includes subdirectory paths registered via the unstable, nightly-only proc_macro::tracked::path() API. The same build is successful when run via
cargo +nightly build.Error
Environment
sccache 0.14.0rustc 1.94.0-nightly (22c74ba91 2026-01-15)Minimal reproduction
The repro uses a fork of include_dir. The only difference from the crates.io 0.7.4 release is that the unstable API names are updated to match current nightly.
Note that I was unable to reproduce it with a single directory level.
Setup
Cargo.toml:
src/lib.rs:
Create fixture files:
To run:
RUSTC_WRAPPER=sccache cargo +nightly build