-
Notifications
You must be signed in to change notification settings - Fork 937
Generated rustfmt/cargo-fmt shims may not work? #1305
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
Yeah, dammit, we require a self update, but running |
Yeah I think I tried the self update and that didn't work as well (as it didn't do anything :( ) |
I have a patch that I think fixes this, but I didn’t manage to write a test that fails on master. This passes: diff --git a/tests/cli-self-upd.rs b/tests/cli-self-upd.rs
index c8bc9c4b..3a24f93a 100644
--- a/tests/cli-self-upd.rs
+++ b/tests/cli-self-upd.rs
@@ -1273,5 +1273,12 @@ fn update_does_not_overwrite_rustfmt() {
"`rustfmt` is already installed");
assert!(rustfmt_path.exists());
assert_eq!(utils::file_size(rustfmt_path).unwrap(), 0);
+
+ // Remove the file as suggested by the error "already installed" error message.
+ utils::remove_file("rustfmt", rustfmt_path).unwrap();
+ assert!(!rustfmt_path.exists());
+
+ expect_ok(config, &["rustup", "self", "update"]);
+ assert!(rustfmt_path.exists());
});
} |
@SimonSapin did you confirm that doing |
“Real” |
CC rust-lang#1305 which this hopefully fixes.
#1310 hopefully fixes this. |
CC rust-lang#1305 which this hopefully fixes.
CC rust-lang#1305 which this hopefully fixes.
This bug still seems to be there (I ran into this twice over the past few weeks, on different machines) with rustup-1.9.0, is that expected? |
I can confirm Terminal commands I ran to update rustc stable and fix broken rustfmt shims (click to expand)
|
I assume that if you have a really old version of rustup and don't |
CC rust-lang#1305 which this hopefully fixes.
I also ran into this same issue using
I also tried removing
|
I think this is resolved by the self-update behaviour described above. As such, I'm closing this issue. If problems remain then please file new issues describing them. |
I got rustup to self-update to 1.8.0 (from the dev archives) and correctly got:
I then ran
cargo uninstall rustfmt
, which removed the bins, but no amount ofrustup update
seems to be causing the files to come into existence.I think that these tools only come into existence during a self update?
cc @nrc
The text was updated successfully, but these errors were encountered: