Repository navigation
chore(hermit): share one CARGO_HOME across worktrees - #8250
Conversation
Hermit defaulted CARGO_HOME to each checkout's .hermit/rust, so dependency sources sat at a different absolute path per worktree and sccache could not reuse dependency compiles between them. Pinning it to ${HOME}/.cargo matches buzz-app.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
🔐 Codex Security Review
Review SummaryOverall Risk: NONE
FindingsNo concrete security, correctness, or reliability findings were identified. Notes
Generated by Codex Security Review | |
wesbillman
left a comment
There was a problem hiding this comment.
No blocking findings. Reviewed 968ef4698bb7f44a0385a8b057cfe06bcda28c5e against 326e2301cb4b1edcb8a72d01ac4b19a83545365f. Comment only, not approval.
- Verified Hermit activation and
bin/hermit env CARGO_HOMEresolve to$HOME/.cargoat this head.bin/cargo --versionand offlinecargo metadata --no-depssucceed; the reported target directory remains worktree-local. The setting matches buzz-app, the explicit registry/git cache paths, and the threeMESH_ROOTlookups that already honorCARGO_HOME. - This intentionally shares Cargo home configuration and credentials as well as dependency downloads; it does not itself select a shared target directory. Existing user-level Cargo settings now apply, which is normal for the chosen standard home.
- Validation limit: runtime CI jobs were skipped by path selection. I did not run a full build or measure cross-worktree sccache hit rates, so the performance gain is not quantified by this review.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
🤖 Hermit defaults
CARGO_HOMEto each checkout's.hermit/rust, so every worktree sees dependency sources at a different absolute path. sccache keys Rust compiles on those paths, which means the same dependency built in two worktrees almost never hits the cache. This pinsCARGO_HOMEto${HOME}/.cargoinbin/hermit.hcl, the same setting buzz-app already uses.CI also lines up better: the workflows that activate Hermit and cache
~/.cargo/registry/~/.cargo/gitwere caching a directory cargo wasn't using (cargo wrote to$GITHUB_WORKSPACE/.hermit/rust). With this change those cache paths are where cargo actually puts the registry and git checkouts. TheMESH_ROOTlookups in_ci-desktop-macos.yml,release.yml, andsigned-macos-canary.ymlalready read${CARGO_HOME:-$HOME/.cargo}, so they follow either way.