perf(dev): share Cargo package cache across worktrees - #199
Conversation
Signed-off-by: John Tennant <jtennant@block.xyz>
52c4b4e to
01c157d
Compare
Signed-off-by: John Tennant <jtennant@block.xyz>
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
APPROVE: Engineering review of the exact prepared three-dot comparison found no publishable findings. The shared Cargo home and binary path are configured together, and the changed test protects both configuration contracts. Supplied GitHub evidence is structurally valid and shows all 10 check runs completed successfully at the reviewed head SHA; required checks still govern merge readiness.
Deterministic publication result: 0 blocking and 0 non-blocking inline finding(s) publishable; 0 duplicate(s) suppressed; 0 blocking screenshot-evidence requirement(s) in this review body.
Pending checks: 1 check(s) are not complete.
This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.
Summary
Hermit currently gives each Berd worktree its own
CARGO_HOME. That duplicates registry and Git dependency downloads and gives dependency sources checkout-specific absolute paths.Use
${HOME}/.cache/berd/cargo-homeas Berd's stable Cargo package home and keep itsbindirectory onPATH. Cargo's package-cache locking supports concurrent access. Cargo target directories remain independently configured and are not shared by this change.Verification
Two fresh macOS worktrees activated Hermit against one initially empty shared Cargo home and built concurrently without package-cache errors. Both resolved the same
CARGO_HOME; the second worktree reused all 59 dependencies in focusedcargo checkandcargo test --no-runruns with no downloads.