Repository navigation
Closed
Description
Context
fbuild already treats zccache as a managed runtime sidecar for compiler caching:
crates/fbuild-build/src/managed_zccache.rspinsMANAGED_ZCCACHE_VERSION = 1.12.7, downloads release binaries into~/.fbuild/<mode>/bin/zccache-<ver>/, and returns thezccacheexecutable path.crates/fbuild-build/src/zccache.rsdiscoversFBUILD_ZCCACHE_BIN, the managed sidecar, or an ambientzccachebinary, then invokes commands such aszccache start,zccache wrap, andzccache fp ...by spawning the binary.
But the workspace still compiles zccache library crates into fbuild:
- root
Cargo.tomlhaszccache-artifact = 1.9. Cargo.lockresolveszccache-artifact,zccache-core, andzccache-hashat1.9.0.crates/fbuild-build/src/framework_libs.rsimportszccache_artifact::KvStore.crates/fbuild-library-select/src/cache.rsimportszccache_artifact::{Key, KvError, KvStore}.
That means fbuild is partly coupled to zccache as a compile-time Rust dependency even though the intended architecture is a sidecar binary boundary.
Proposal
Remove zccache-artifact and its transitive zccache crates from fbuild's compile graph. Any functionality that currently uses zccache_artifact::KvStore should move behind a sidecar-backed boundary or an fbuild-owned minimal cache abstraction.
Preferred direction:
- Keep zccache itself as a runtime sidecar binary, resolved by the existing managed sidecar flow.
- Replace direct Rust imports of
zccache_artifact::{Key, KvError, KvStore}with either:- sidecar CLI calls if zccache exposes the needed K/V operations, or
- a small fbuild-local disk cache abstraction for fbuild-specific memoization if the data is not actually zccache-owned.
- Remove
zccache-artifact = 1.9from workspace dependencies and updateCargo.lockso nozccache-*crates are compiled as part of fbuild unless independently justified.
Acceptance criteria
cargo tree --invert zccache-artifactreports no fbuild consumers.Cargo.tomlno longer declareszccache-artifactas a workspace dependency.Cargo.lockno longer containszccache-artifact,zccache-core, orzccache-hashsolely due to fbuild crates.- Existing runtime behavior remains: fbuild still finds/downloads/runs the managed zccache sidecar for compiler wrapping and fingerprint operations.
- Framework/library selection cache behavior remains covered by tests, either through the new sidecar-backed path or an fbuild-owned cache implementation.
Related issues
- Proposal: first-class
fbuild cache save / restorefor toolchains + platforms + framework + zccache sidecar #527 is related but broader: it tracks first-classfbuild cache save / restoreand zccache sidecar delegation for archive workflows. This issue is narrower: remove zccache Rust crates from fbuild's compile-time dependency graph.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
chore: replace zccache kvstore dependency (#602)