You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rustup 1.28.0 has started using symlinks for proxy links. Unfortunately, the links are absolute symlinks, so they break when moving that install folder around.
The use case is a caching system that installs the rust toolchain in a temp folder, then moves it to a folder named after a hash key. Installing under the final location is not possible as that would expose a half-installed toolchain to concurrent users of the cache, hence the use of a temp folder and an atomic rename of it.
Steps
rustup toolchain install {quote(rust_version)} --profile minimal {components} with CARGO_HOME and RUSTUP_HOME set to point at the folder to install into.
Possible Solution(s)
An option to revert to using hardlinks
make rustup use relative symlinks rather than absolute
Notes
I'm not sure if relocating the install folder is really supported.
Thanks for the report, I agree we should use relative paths for binary symlinks where possible. Especially if it's linking within the same parent directory (which proxies should do).
FIX
rustup 1.28.0 started using absolute symlinks for some toolchain files
rather than using hardlinks. That is a problem for LISA as the Rust
toolchain is installed in a temporary folder that is then moved under a
long-term name. When the folder gets rename, all symlinks break as they
are absolute:
rust-lang/rustup#4222
Fix that by adding a post-processing pass after running rustup so that
symlinks get re-written as relative links.
Verification
Problem
rustup 1.28.0 has started using symlinks for proxy links. Unfortunately, the links are absolute symlinks, so they break when moving that install folder around.
The use case is a caching system that installs the rust toolchain in a temp folder, then moves it to a folder named after a hash key. Installing under the final location is not possible as that would expose a half-installed toolchain to concurrent users of the cache, hence the use of a temp folder and an atomic rename of it.
Steps
rustup toolchain install {quote(rust_version)} --profile minimal {components}
with CARGO_HOME and RUSTUP_HOME set to point at the folder to install into.Possible Solution(s)
Notes
I'm not sure if relocating the install folder is really supported.
Rustup version
1.28.0
Installed toolchains
OS version
Ubuntu 24.04.2 LTS
The text was updated successfully, but these errors were encountered: