← Back to issue list

rust plugin: split RUSTUP_HOME and CARGO_HOME

View original Github issue

Metadata

Project
snapcraft
Number
#2849
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR #2849 (commit 0b2fdb72b) separates RUSTUP_HOME (~/.rustup) from CARGO_HOME (~/.cargo), avoiding shared-directory side effects.

Resolution: closed resolved

Reason: The approved Rust plugin change was merged as snapcore/snapcraft#2849 in commit 0b2fdb72b, assigning distinct default directories to rustup and cargo.

Evaluated by: mr-cal-bot

No scores available.

Issue body

RUSTUP_HOME is typically ~/.rustup CARGO_HOME is typically ~/.cargo They are both currently set to ~/.cargo. It has been reported that overlapping the two may have side effects. While I have not yet reproduced this, it's probably a good idea to decouple the two directories anyways. LP: #1852545 Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR #2849 (commit 0b2fdb72b) separates RUSTUP_HOME (~/.rustup) from CARGO_HOME (~/.cargo), avoiding shared-directory side effects.
stealth/space-bunny-alpha — closed resolved Merged #2849 in commit 0b2fdb72b, separating RUSTUP_HOME (~/.rustup) from CARGO_HOME (~/.cargo) to prevent shared-directory side effects.
stealth/space-bunny-alpha — closed resolved Merged snapcore/snapcraft#2849 to separate RUSTUP_HOME (~/.rustup) and CARGO_HOME (~/.cargo) in the Rust plugin, avoiding side effects from sharing ~/.cargo.
qwen/qwen3.6-35b-a3b — — Merged Rust plugin changes decoupling RUSTUP_HOME and CARGO_HOME. Previously both defaulted to ~/.cargo, risking side effects. They now point to ~/.rustup and ~/.cargo respectively. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 — — Merged changes to the Rust plugin that decouple RUSTUP_HOME and CARGO_HOME. RUSTUP_HOME now defaults to ~/.rustup instead of ~/.cargo, preventing potential side effects from overlapping directories per LP: #1852545.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1852545 rust plugin build fails due to wrong env var snapcraft (launchpad) closed Fixed in snapcore/snapcraft#2849 (commit 0b2fdb72b) by separating CARGO_HOME and RUSTUP_HOME; the change was tracked as part of Snapcraft 3.10.
75%
#2434 rust plugin: refactor to use the latest rustup snapcraft merged Merged PR #2434 in commit 3e821ca8d, updating the Rust plugin for current rustup, sharing toolchain storage, and adopting .cargo/config.
75%