fix: Resolve exact cargo profile outputs - #13366
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…dening # Conflicts: # crates/turborepo-engine/src/builder/definitions.rs # crates/turborepo-engine/src/builder/test.rs # crates/turborepo-engine/src/builder/test/core.rs # crates/turborepo-repository/src/cargo.rs # crates/turborepo-repository/src/toolchain.rs
…o shew/cargo-exact-profile-outputs
…ile-outputs # Conflicts: # crates/turborepo-repository/src/cargo.rs # crates/turborepo/ARCHITECTURE.md # crates/turborepo/tests/cargo_workspace_test.rs
tknickman
approved these changes
Jul 13, 2026
anthonyshew
added a commit
that referenced
this pull request
Jul 13, 2026
## Why Cargo target triples and target-directory overrides move deliverables outside the host default layout. Caching those builds requires exact, validated paths to avoid cross-target restores and repository escapes. This is stack 4/4, following #13360, #13362, and #13366. ## What Resolve validated CLI/environment targets and contained CLI/environment/metadata target directories, including repository `target-dir`. Repository `build.target`, unsupported/custom targets, nonstandard `CARGO_BUILD_TARGET_DIR`, external configuration, and path escapes remain fail-closed. ## How Probe `rustc --print target-list` under the same rustup selection as execution, apply Cargo precedence, canonicalize the nearest existing target-directory path inside the repository, and emit one exact target/profile/platform artifact path. Validated repository, engine, and library suites; all 37 Cargo E2Es; `cargo lint`; formatting; diff checks; and push hooks.
anthonyshew
pushed a commit
that referenced
this pull request
Jul 13, 2026
## Release v2.10.6-canary.1 > [!CAUTION] > Versioned docs aliasing FAILED. [View logs](https://github.com/vercel/turborepo/actions/runs/29283293226) ### Changes - fix: Preserve watch rerun semantics for task inputs (#13351) (`6ed5eab`) - fix: Isolate Command Overrides From Toolchain Cache I/O (#13354) (`e76f0b4`) - release(turborepo): 2.10.5-canary.6 (#13355) (`f82e2c7`) - fix: Include patched Ghostty crate in Cargo workspace (#13357) (`b3cd7a1`) - ci: Shard Rust tests across runners (#13356) (`ef122d9`) - fix: Hash Cargo build environment inputs (#13348) (`d533266`) - fix: Synchronize Cargo prune Docker lockfile (#13350) (`ed17249`) - chore: Update agents app Eve dependency (#13364) (`38aa7d2`) - fix: Preserve Yarn package extension ranges when pruning (#13363) (`6ed2fb4`) - refactor: Add `Toolchain` output availability (#13360) (`82bcfb6`) - release(turborepo): 2.10.5 (#13368) (`a6a563a`) - fix: Disable unresolved Cargo artifact caching (#13362) (`d76aa27`) - fix: Surface create-turbo Git failures (#13371) (`8a8b133`) - fix: Resolve exact cargo profile outputs (#13366) (`0e6a99b`) - fix: Prune Bun production workspace dev dependencies (#13369) (`fee6b66`) - fix: Resolve Cargo target output layouts (#13370) (`8c097cd`) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew
pushed a commit
that referenced
this pull request
Jul 22, 2026
## Release v2.10.6 > [!CAUTION] > Versioned docs aliasing FAILED. [View logs](https://github.com/vercel/turborepo/actions/runs/29930611207) ### Changes - release(turborepo): 2.10.5 (#13368) (`a6a563a`) - fix: Disable unresolved Cargo artifact caching (#13362) (`d76aa27`) - fix: Surface create-turbo Git failures (#13371) (`8a8b133`) - fix: Resolve exact cargo profile outputs (#13366) (`0e6a99b`) - fix: Prune Bun production workspace dev dependencies (#13369) (`fee6b66`) - fix: Resolve Cargo target output layouts (#13370) (`8c097cd`) - release(turborepo): 2.10.6-canary.1 (#13374) (`d0dca26`) - fix: Preserve Yarn Babel extension during pruning (#13373) (`02ef828`) - feat: Support Cargo-only repos (#13378) (`24dc68e`) - fix: Preserve colors in TUI output (#13381) (`99c9ffb`) - feat: Infer Cargo workspace tasks (#13380) (`58fe9df`) - fix: Retain shutdown signals for force exit (#13382) (`62ecdaa`) - release(turborepo): 2.10.6-canary.2 (#13383) (`8035b5d`) - fix: Resolve weekly security audit vulnerabilities (#13358) (`64f4aac`) - chore: Update to Rust 1.97.0 (#13322) (`feb0a1a`) - fix: Pin VS Code extension macOS runners (#13391) (`26169cd`) - release(turborepo): 2.10.6-canary.3 (#13392) (`f753f04`) - docs: Add Experimental Rust Guide (#13375) (`a2bf8a2`) - ci: Use affected filtering for JS tests (#13386) (`0536a70`) - ci: Fold docs checks into quality (#13385) (`fcd1858`) - ci: Verify schemas through Turborepo (#13387) (`66551bc`) - chore: Avoid duplicate N-API Cargo build (#13388) (`4ddacf4`) - chore: Hash embedded frameworks data in Rust builds (#13389) (`373c0a2`) - ci: Include VS Code extension type checks (#13390) (`716ad9c`) - refactor: Run releaser bundle directly (#13393) (`b6a92de`) - refactor: Move release publishing into releaser (#13394) (`e0cf33c`) - refactor: Consolidate release orchestration (#13395) (`51f5529`) - feat: Add crate-scoped Cargo verification tasks (#13398) (`aeb2ee5`) - fix: Fetch release commit parent (#13400) (`ab05127`) - docs: Update Geistdocs to 1.13.0 (#13412) (`b1d8c9f`) - release(turborepo): 2.10.6-canary.4 (#13401) (`90eba05`) - fix: Preserve pnpm `node@runtime:` lockfile entries (#13408) (`4ac2f47`) - chore: Fix typos in with-solid example and globwatch comment (#13416) (`424cabd`) - refactor: Remove unused public APIs found by Hawk (#13420) (`831990d`) - fix: Check dynamic imports in boundaries (#13418) (`31be2b8`) - refactor: Use regex! for static pattern compilation (#13419) (`82cd34c`) - fix: Refactor `turbo watch` (#13423) (`328b99f`) - release(turborepo): 2.10.6-canary.5 (#13424) (`ceee06b`) - chore: Upgrade brace-expansion (#13429) (`d45bf2a`) - chore: Update tar to 7.5.18 (#13428) (`d0dbd5a`) - chore: Upgrade js-yaml (#13427) (`c8e36ad`) - fix: Match JIT inputs for affected tasks (#13426) (`1b95fcb`) - fix: Preserve project Yarn package extensions (#13425) (`f08f35c`) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Wildcard Cargo outputs can restore artifacts from the wrong profile or platform even when task hashes differ. Exact host-layout outputs prevent cross-profile and cross-platform cache contamination.
This is stack 3/4, following #13360 and #13362.
What
Resolve the effective host profile and platform basename for default-target builds. Explicit targets and target-directory variants remain fail-closed for stack 4.
How
The resolver retains the
rustc -vVhost triple, accepts only known layout-neutral Cargo flags, maps built-in profiles to their output directories, and emits one exact path per deliverable. Validated repository, engine, and library suites; all 30 Cargo E2Es including bidirectional profile isolation/restoration;cargo lint; formatting; diff checks; and push hooks.