You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The filename or extension is too long. (os error 206) #2397
When running builds with extremely long command lines in response files, we get sccache failures like
sccache: error: failed to spawn Command { std: ... }
sccache: caused by: The filename or extension is too long. (os error 206)
It looks like sccache is expanding the contents of the response file, which defeats the main purpose of the response file existing. Is there a way around this?
We started hitting this after bumping sccache from 0.14.0 to 0.19.0. Plain cargo on Windows (MSVC host), building for wasm32-unknown-unknown, fails while compiling web-sys:
sccache: error: failed to spawn Command { std: "C:\\...\\rustc.exe" "--crate-name" "web_sys" ... }
sccache: caused by: The filename or extension is too long. (os error 206)
error: could not compile `web-sys` (lib)
The rustc command line for web-sys is longer than Windows allows. Most of it is the --check-cfg flag listing every web-sys feature, so I'd expect anyone depending on web-sys on Windows to run into this, whatever features they enable.
Cargo already handles long command lines by retrying with an argfile, and that part seems to work, since sccache itself starts fine. It's sccache that then fails to launch rustc. My guess is it expands the argfile and passes everything inline instead of giving rustc an argfile again.
Nothing else changed between the passing and failing runs. The toolchain, lockfile and web-sys version were the same, and only the sccache version was different.
Could sccache fall back to an argfile when launching rustc, the same way cargo does (possibly related to #2815)? For now we've pinned our Windows CI back to 0.14.0.
Activity
chore(ci): pin sccache to 0.16 on windows due to cli len limit (n0-co…
brian6932 commentedon Sep 19, 2026
FWIW, even if you disable the Windows path filename limits, this still occurs. The paths are THAT long.
fix(ci): short CARGO_TARGET_DIR on the Windows test lane
chore(ci): pin sccache to 0.16 on windows due to cli len limit (n0-co…
Cache the Windows Rust builds through sccache
ci: Windows jobs use sccache again, pinned to 0.16
TMysliwiec commentedon Nov 10, 2026
We started hitting this after bumping sccache from 0.14.0 to 0.19.0. Plain cargo on Windows (MSVC host), building for wasm32-unknown-unknown, fails while compiling web-sys:
The rustc command line for web-sys is longer than Windows allows. Most of it is the
--check-cfgflag listing every web-sys feature, so I'd expect anyone depending on web-sys on Windows to run into this, whatever features they enable.Cargo already handles long command lines by retrying with an argfile, and that part seems to work, since sccache itself starts fine. It's sccache that then fails to launch rustc. My guess is it expands the argfile and passes everything inline instead of giving rustc an argfile again.
Nothing else changed between the passing and failing runs. The toolchain, lockfile and web-sys version were the same, and only the sccache version was different.
Could sccache fall back to an argfile when launching rustc, the same way cargo does (possibly related to #2815)? For now we've pinned our Windows CI back to 0.14.0.
chore(rust): upgrade to Rust 1.100 (#16479)
add WA for sccache
Fix CI for the cargo 1.100 build-dir layout
CI: Windows game build through a patched sccache 0.19.0
ci: Windows job 绕开 sccache,修复 PR 上必红的 spawn 失败
ci: fix PyPy cross-builds and Windows ARM64 compilation (#3364)
ci(windows): run the R CMD check without sccache
ci(windows): run the R CMD check without sccache (#2353) (#2354)
ci: pin sccache 0.16.0 on Windows to stay under the CreateProcess limit
ci: unpin sccache on Windows (#16737)
ci: Windows job 绕开 sccache,修复 PR 上必红的 spawn 失败
chore(ci): pin sccache to 0.16 on windows due to cli len limit (n0-co…