Skip to content

cargo-fmt does not work with rustup 1.24.0 #2737

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

Closed
EverlastingBugstopper opened this issue Apr 27, 2021 · 2 comments · Fixed by #2738
Closed

cargo-fmt does not work with rustup 1.24.0 #2737

EverlastingBugstopper opened this issue Apr 27, 2021 · 2 comments · Fixed by #2738
Labels

Comments

@EverlastingBugstopper
Copy link
Contributor

Problem
cargo fmt can no longer be run as of rustup 1.24.0

Steps

$ rustup self update
info: checking for self-updates
info: downloading self-update
  rustup updated - 1.24.0 (from 1.23.1)
$ rustup update
rustup update     
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2021-04-27, rust version 1.53.0-nightly (968425893 2021-04-26)
info: skipping nightly which is missing installed component 'rustfmt'
info: syncing channel updates for 'nightly-2021-04-26-x86_64-unknown-linux-gnu'
info: latest update on 2021-04-26, rust version 1.53.0-nightly (3709ae324 2021-04-25)
info: skipping nightly which is missing installed component 'rustfmt'
info: syncing channel updates for 'nightly-2021-04-25-x86_64-unknown-linux-gnu'
info: checking for self-updates

   stable-x86_64-unknown-linux-gnu unchanged - rustc 1.51.0 (2fd73fabe 2021-03-23)
  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.53.0-nightly (42816d61e 2021-04-24)

info: cleaning up downloads & tmp directories
$ rustup component add rustfmt
info: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is up to date
$ cargo fmt 
error: unknown proxy name: 'cargo-fmt'; valid proxy names are 'rustc', 'rustdoc', 'cargo', 'rust-lldb', 'rust-gdb', 'rls', 'cargo-clippy', 'clippy-driver', 'cargo-miri'

Possible Solution(s)
This seems to work just fine on rustup 1.23.1, so we should likely be looking at recent changes

Notes

$ rustup --version
rustup --version           
rustup 1.24.0 (2f894d923 2021-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.51.0 (2fd73fabe 2021-03-23)`
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/avery/.rustup

installed toolchains
--------------------

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
1.47.0-x86_64-unknown-linux-gnu

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown
x86_64-apple-darwin
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl

active toolchain
----------------

stable-x86_64-unknown-linux-gnu (directory override for '/home/avery/work/rover')
rustc 1.51.0 (2fd73fabe 2021-03-23)
@Rustin170506
Copy link
Member

It seems introduced by #2716.

@pietroalbini
Copy link
Member

We reverted the production branch of Rustup to the known good version 1.23.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants