-
Notifications
You must be signed in to change notification settings - Fork 44
Rustwide fails due to symlink resolution with new rustup
#94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Currently docs.rs builds are broken because of this: https://rust-lang.zulipchat.com/#narrow/channel/356853-t-docs-rs/topic/Last.20successful.20build.20was.2015.20hours.20ago in the docs.rs team we're currently trying to find a way to freeze an older rustup version, but weren't successful yet |
Should this maybe also be reported to rustup? |
I tried this hacky fix, which solved the immediate problem ( pub(crate) fn normalize_path(orig_path: &Path) -> PathBuf {
let mut p = std::fs::canonicalize(orig_path).unwrap_or_else(|_| orig_path.to_path_buf());
if let Some(file_name) = orig_path.file_name() {
if let Some(parent_dir) = p.parent() {
p = parent_dir.join(file_name);
}
}
// ..
} |
I created a PR that will (for now) freeze the used rustup version to 1.27.1, and disable its self-update |
I released 0.19.1 which freezes rustup to 1.27.1 |
thanks @syphar! was able to get docs building at shipyard.rs last night with the help of your PR. have you determined whether rustup 0.28.1 works with rustwide builds (i.e. reverts the switch from hardlinks to symlinks)? haven't had time to check yet. |
You're very welcome! Good to hear you're using rustwide in shipyard.rs too.
It doesn't switch to hardlinks again, but changed absolute symlinks to relative symlinks. But it still doesn't work. I'll have to dig into how exactly the rustup/cargo folders are mapped into the docker container so figure out why the symlinks don't work. |
Since
rustup
1.28 PR rust-lang/rustup#4023,cargo-home/bin/cargo
is symlinked tocargo-home/bin/rustup
. As part of running a command, the binary's path isutils::normalize_path
'd, which includes symlink resolution. As a result,cargo
commands end up being called asrustup
, for example,rustup install git-credential-null
which results in an error.I'm not sure, but a hacky fix could be to store the filename before resolution (the
canonicalize
call) and restore it afterwards?rustwide/src/utils.rs
Lines 111 to 112 in 744375a
For the short term, is there a way to override the
rustup
version being used short of changing the hardcoded URL?The text was updated successfully, but these errors were encountered: