This is a Vercel-maintained fork of mozilla/sccache. It is maintained as a stack of patches managed with Graphite, each branch containing a single feature/fix on top of the upstream branch.
For full upstream documentation, see the upstream README or the upstream repository.
upstream— Tracksmozilla/sccachemain. This is the base of the stack.vercel/ci-fixes— Bottom of the stack (CI cleanup).vercel/multilevel-cachingthroughvercel/fork-readme-ci— Stacked feature branches.main— Always points to the top of the stack (same commit as the topmost branch).
Each patch is a single Graphite branch with one commit. The stack order (bottom to top):
-
CI fixes (
vercel/ci-fixes) — Removes coverage, benchmarks, snap, FreeBSD, and unsupported cross-compilation targets from upstream CI. -
Multi-level caching (
vercel/multilevel-caching) — Cherry-picked from upstream mozilla/sccache#2581. Adds hierarchical cache storage (e.g., disk -> redis -> s3). Drop once merged upstream. -
Crate type allow hash (
vercel/crate-type-allow-hash) — WhenSCCACHE_RUST_CRATE_TYPE_ALLOW_HASHis set, all crate types become cacheable. The env var value is hashed into the cache key only when unsupported crate types are present. -
OpenDAL upgrade + Vercel Artifacts backend (
vercel/opendal-upgrade-artifacts) — Upgrades opendal via[patch.crates-io](apache/opendal#7334). Adds Vercel Artifacts cache backend withSCCACHE_VERCEL_ARTIFACTS_TOKEN,_ENDPOINT,_TEAM_ID,_TEAM_SLUG. -
Reflink-based disk cache (
vercel/file-clone-reflink) — Cherry-picked from upstream mozilla/sccache#2640.SCCACHE_FILE_CLONE=truestores entries uncompressed and restores via filesystem reflinks. Drop once merged upstream. -
Directory dep-info hashing (
vercel/fix-dir-dep-info) — Fixes mozilla/sccache#2653. Handles directories in rustc dep-info by recursively hashing contents. -
This README + CI/release workflows + version suffix (
vercel/fork-readme-ci) — Fork documentation,vercel-ci.yml,vercel-release.yml, and-vercelsuffix onsccache --version.
This fork uses Graphite to manage the patch stack. Install with npm i -g @withgraphite/graphite-cli.
gt loggt checkout vercel/<branch-to-edit>
# make changes
git add -A && git commit --amend --no-edit
gt restack # rebase all branches above
git checkout vercel/fork-readme-ci # go to top
git branch -f main HEAD # point main at top of stack
git push --force-with-lease origin main vercel/<changed-branch> [other affected branches...]gt checkout vercel/<branch-below> # check out where to insert
gt create vercel/<new-branch> -m "commit message"
# make changes
git add -A && git commit -m "description"
gt restack # rebase everything above
git checkout vercel/fork-readme-ci
git branch -f main HEAD
git push --force-with-lease origin main vercel/<new-branch> [restacked branches...]Then create a PR:
gh pr create --base vercel/<branch-below> --head vercel/<new-branch> --title "[N/M] description"And update the base of the PR that was previously on top of <branch-below>:
gh pr edit <pr-number> --base vercel/<new-branch>If an upstream PR (e.g., #2581) gets merged:
gt checkout vercel/<branch-to-drop>
gt move --onto upstream # or onto the branch below it
# if the branch is now empty, delete it
gt restack
git checkout vercel/fork-readme-ci
git branch -f main HEADgit fetch upstream
git checkout upstream
git reset --hard upstream/main # update the upstream branch
git push --force-with-lease origin upstream
gt restack # rebase entire stack
git checkout vercel/fork-readme-ci
git branch -f main HEAD # point main at top
git push --force-with-lease origin --allAlways finish with:
git checkout vercel/fork-readme-ci # top of stack
git branch -f main HEAD # sync main
git push --force-with-lease origin main [affected branches...]vercel-ci.yml— Runscargo teston Ubuntu on every push/PR.vercel-release.yml— Manual trigger (workflow_dispatch). Builds static musl binaries forx86_64andaarch64Linux, then creates a GitHub release taggedvercel-YYYYMMDDwith the patch stack in the release description.
After modifying the stack, verify with:
cargo fmt --all
cargo clippy --locked --all-targets -- -D warnings -A unknown-lints -A clippy::type_complexity -A clippy::new-without-default
cargo build
cargo testGenerate a per-file diff manifest:
for commit in $(git log --reverse --format="%H" upstream..HEAD); do
echo "### $(git log --oneline -1 $commit)"
git diff-tree --no-commit-id --name-status -r $commit
echo
done