Repository navigation
Closed
Description
Follow-up to #789 (closed by #798).
Phase 4 stage 1 (#793) made the embedded ZccacheService the
default but kept the wrapper-mode code path alive as a safety net,
selectable via FBUILD_ZCCACHE_EMBEDDED=0. This issue is the
stage 2 cleanup: embedded is now MANDATORY, the opt-out is
deleted, every wrapper-mode escape hatch is removed.
Goal
After this PR:
FBUILD_ZCCACHE_EMBEDDEDenv var does nothing — both=0and
=1are ignored. (Eventually atracing::warn!if seen, then
removed.)CompileBackend::Wrappedvariant gone.CompileBackendbecomes
a unit struct or a typedef for the embedded service handle.--no-default-featuresno longer drops zccache — the
embeddedCargo feature is gone (it's just "compiled in,
always").- The managed
zccache.exe/zccache-daemon.exe/zccache-fp.exe
binary download path (managed_zccache.rs) is deleted. ~/.fbuild/<mode>/bin/zccache-*is no longer a directory fbuild
creates.
Files to delete
crates/fbuild-build/src/managed_zccache.rs(whole file).- The
compile_sourcewrapper-mode arms in
crates/fbuild-build/src/compiler.rs(~lines 631–681 — the
if cfg!(windows) { … wrap_args … } else { … }block + the
run_command+ retry-on-stale-daemon dance). wrap_args,find_zccache,discover_env_zccache,
find_zccache_in_venv,ensure_running,stop,
output_has_stale_daemon_error, and theZCCACHE_PATHcache in
crates/fbuild-build/src/zccache.rs.check_fingerprint/mark_fingerprint_successlose their
wrapper-mode fallback bodies (the embedded path becomes the only
path).FBUILD_NO_ZCCACHEandFBUILD_ZCCACHE_BINenv-var handling
everywhere.MANAGED_ZCCACHE_VERSIONreferences inpyproject.toml, in
CI release matrix, and in.github/scripts/.- The
compiler_cache: Option<&Path>parameter on
compile_source,Compiler::compile_one, and every per-platform
compiler that threads it (avr, esp32, esp8266, rp2040, stm32,
teensy, nrf52, nxplpc, sam, silabs, apollo3, ch32v, renesas,
generic_arm). - The wrapper-mode path-normalization helpers in
crates/fbuild-build/src/zccache.rs(compile_cwd_from_output,
path_arg_for_compile_cwd,normalize_flags_for_compile_cwd,
strip_unc_prefix,flag_takes_path_argument,
split_joined_path_flag) MAY be retained if the embedded
service needs them at the call boundary. Decide per-helper.
Files to update
crates/fbuild-build/Cargo.toml— delete theembeddedfeature
flag; promotezccache = { git = …, optional = true }to an
unconditional dep.crates/fbuild-daemon/Cargo.toml— drop theembeddedfeature
propagation.crates/fbuild-build/src/compile_backend.rs— collapse
CompileBackendto a thin wrapper around
Arc<FbuildZccacheService>. Renamefrom_envtostartsince
there's no env-var branching left. DeleteEmbeddedServiceError:: Startfallback warnings — failure becomes a hard error (the
daemon refuses to start if zccache can't).crates/fbuild-build/src/zccache_embedded.rs— keep, but rename
FbuildZccacheService::startto clarify it's the only entry
point. Inline thecompile_blockingcall site into
compile_sourcesince there's no longer a wrapper alternative
to switch on.crates/fbuild-daemon/src/main.rs—install_globalbecomes
unconditional; remove the fallback log lines.crates/fbuild-daemon/src/context.rs—compile_backendfield
becomesArc<FbuildZccacheService>instead of an enum.crates/fbuild-build/README.md— replace the "Two backends" section
with a "How zccache is wired" section. No more opt-out section,
no more--no-default-featuresadvice.CLAUDE.md— drop every mention ofMANAGED_ZCCACHE_VERSION
and the lockstep-bump workflow.docs/RELEASING.md— same.
Issues to close in the same PR
- FastLED/fbuild#32
— the rationale for the intentionally-detachedzccache start
spawn (so the wrapper daemon could outlivefbuild-daemon) is
moot onceensure_runningis gone. The cache is now part of
the fbuild process; it dies with the fbuild process. Add
Closes #32to the PR body.
Acceptance
-
cargo check --workspace --all-targetsclean. No
--features fbuild-build/embeddedinvocation needed
anywhere (the feature is gone). -
cargo clippy --workspace --all-targets -- -D warningsclean. -
uv run test --fullgreen on Linux, macOS, Windows. -
grep -rn 'FBUILD_ZCCACHE_EMBEDDED\|FBUILD_NO_ZCCACHE\|FBUILD_ZCCACHE_BIN\|MANAGED_ZCCACHE_VERSION\|managed_zccache\|wrap_args\|ensure_running' crates/ docs/ CLAUDE.md
returns no hits (except possibly in a release note / CHANGELOG). -
~/.fbuild/<mode>/bin/zccache-*is NOT created on a clean
run against a fresh~/.fbuild/. - Process snapshot during
fbuild build tests/platform/uno
shows zerozccache.exe/zccache-daemon.exe/
zccache-fp.exechildren. No wrapper binary spawn anywhere. -
crates/fbuild-build/Cargo.tomlhas noembeddedfeature
entry.zccachedep is unconditional. - Daemon teardown hardening: process containment + socket lingering + console events #32 closed in the same PR.
Risks / sequencing
- One release cycle of soak time on the stage-1 default flip
(perf(zccache) Phase 4: flip embedded to default, retire managed wrapper #793) before this PR. Stage 1 shipped in feat(zccache): omnibus migration — embedded backend as default (#789 Phases 1-4) #798. Land this
cleanup only after a release where stage-1's default has been
exercised in the wild without regressions. The PR is irreversible
in practice (the wrapper code is gone, not gated off), so the
validation gate matters. - Cross-platform CI must light up on the stage-2 PR. The
embedded service's cache directory creation, file locking, and
path-normalization behavior all need to work on Linux + macOS +
Windows without the wrapper-mode safety net. - Any consumer of
find_zccacheoutside fbuild-build itself —
none today AFAIK, but worth a finalgrepbefore deleting.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
feat(zccache): embedded mandatory — delete wrapper fallback (#800, cl…
chore: bump version to 2.3.12
ci: downgrade soldr 0.7.63 → 0.7.59 (unblock 2.3.12 release)
ci: drop aarch64-pc-windows-msvc lane (matches v2.3.11 working matrix)
test(async): drop wrapper-mode zccache integration test (removed in #800
feat(async): whole-app tokio runtime — full async migration (#813) (#823
fix(build): route framework-lib compiles through embedded zccache (#986…
refactor(platform): migrate host and process consumers to neutral fac…