rustup
rustup copied to clipboard
Stop setting CARGO_HOME on Cargo
Problem you are trying to solve
Cargo would like to detect when the user has set CARGO_HOME and act on that appropriately for https://github.com/rust-lang/cargo/issues/1734 but rustup always sets it
Solution you'd like
At the All Hands, we talked about rustup not setting this anymore. It is set to ensure rustup and cargo are in-sync, particularly when they had different definitions of CARGO_HOME. The first step will be to qualify the versions and platforms for which CARGO_HOME diverged between the two programs so we can evaluate how bad the problem is and what we can do to mitigate it.
Possible mitigations include:
- Have the users manually set
CARGO_HOMEwhen running an old version of Cargo - Have the proxy determine whether it needs to set
CARGO_HOME, at the risk of impacting performance
Notes
No response
If anyone picks this up, I did some initial digging and some relevant links are
- https://github.com/rust-lang/rustup/pull/117 (2016)
- https://github.com/rust-lang/rustup/pull/1919 (2019)
- https://github.com/rust-lang/rustup/pull/2393 (2020)
- https://github.com/brson/home