Skip to content

fix(dev): isolate Cargo targets per worktree - #197

Merged
johnmatthewtennant merged 3 commits into
mainfrom
jtennant/per-worktree-cargo-targets
Sep 3, 2026
Merged

fix(dev): isolate Cargo targets per worktree#197
johnmatthewtennant merged 3 commits into
mainfrom
jtennant/per-worktree-cargo-targets

Conversation

@johnmatthewtennant

@johnmatthewtennant johnmatthewtennant commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Berd currently directs interactive Cargo commands from every checkout on a machine to one target directory. Concurrent just dev, test, check, and Clippy processes then serialize on the Cargo artifact lock.

Default development Cargo output to each checkout's ignored src-tauri/target directory on Unix and Windows, while preserving BERD_TAURI_CARGO_TARGET_DIR as an explicit override. Unix just bundle and just bundle-debug retain the shared bundle target expected by existing packaging consumers.

Reviewer-reproducible examples

Resolve development and bundle targets separately:

bash scripts/resolve-tauri-cargo-target-dir.sh
bash scripts/resolve-tauri-cargo-target-dir.sh bundle

The first prints the checkout's src-tauri/target. On macOS, the second prints ~/Library/Caches/berd-tauri/cargo-target.

An explicit override remains unchanged in either scope:

BERD_TAURI_CARGO_TARGET_DIR=/tmp/berd-target bash scripts/resolve-tauri-cargo-target-dir.sh
BERD_TAURI_CARGO_TARGET_DIR=/tmp/berd-target bash scripts/resolve-tauri-cargo-target-dir.sh bundle

@johnmatthewtennant
johnmatthewtennant marked this pull request as ready for review September 3, 2026 19:25
@johnmatthewtennant
johnmatthewtennant requested a review from a team September 3, 2026 19:25
Signed-off-by: John Tennant <jtennant@block.xyz>
Signed-off-by: John Tennant <jtennant@block.xyz>

@morgmart morgmart left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Automated code review

APPROVE. Corrected the completed Engineering review artifact after re-checking the exact three-dot comparison 20c005a...0574251 and the supplied current changed-line anchors. The five changed files consistently isolate development Cargo targets by checkout while retaining the explicit override and shared Unix bundle target contract. No publishable or duplicate-suppressed finding remains. The supplied GitHub evidence was inspected and is structurally valid for the exact base and head; all ten supplied check runs succeeded, while required checks independently 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.

@johnmatthewtennant
johnmatthewtennant merged commit e3120ee into main Sep 3, 2026
10 checks passed
@johnmatthewtennant
johnmatthewtennant deleted the jtennant/per-worktree-cargo-targets branch September 3, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants