Opt-in seeding of trybuild target from parent workspace
- Dominant language
- Rust
- Stars
- 998
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
Different shape from the closed #329 (which shared the parent's target dir and ran into build-lock contention).
A new opt-in env var `TRYBUILD_INHERIT_CACHE`, gated behind a new optional `inherit-cache` cargo feature. When the feature is enabled at build time AND the env var is set at runtime, trybuild seeds its own isolated `target/tests/trybuild//debug/` from the parent workspace's `target/debug/{deps,.fingerprint,incremental,build}/` before spawning cargo. The trybuild target dir override stays — preserving lock isolation from the parent.
Seeding uses `reflink-copy` (CoW where the filesystem supports it, plain copy fallback elsewhere — never hardlink, to avoid corrupting the parent on cargo's truncating writes). Mtime-based staleness skips the seed if the parent hasn't changed since the last run.
When the feature is off (default) or the env var unset, behavior is bit-identical to today.
Surfacing the approach here first since it's a non-trivial implementation; PR will follow.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.