Skip to content

Remove needless FIXME. Fixes #2811. - #6052

Closed
nikomatsakis wants to merge 1 commit into
rust-lang:incomingfrom
nikomatsakis:remove-2811
Closed

Remove needless FIXME. Fixes #2811.#6052
nikomatsakis wants to merge 1 commit into
rust-lang:incomingfrom
nikomatsakis:remove-2811

Conversation

@nikomatsakis

Copy link
Copy Markdown
Contributor

r? whomever.

bors added a commit that referenced this pull request Apr 25, 2013
@borsbors closed this Apr 25, 2013
@nikomatsakis
nikomatsakis deleted the remove-2811 branch March 30, 2016 16:17
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
In an attempt to fixrust-lang#6052 and rust-lang#4249 this attempts to detect
if rustfmt is a rustup proxy which isn't installed, and reports
the error message to the user for them to fix.
In theory this ought to be memoised but for now it'll do as-is.
Future work might be to ask the user if they would like us to
trigger the installation (if possible).
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
7055: Install rustfmt if needed during formatting request r=matklad a=kinnison
In order to fixrust-lang#6052 and to fixrust-lang#4249 this PR installs `rustfmt` using `rustup` if `rustfmt --help` fails.
In theory we ought to memoise the attempts (both the `--help` and the installation) so that we don't keep retrying something which will fail (e.g. if nightly is missing rustfmt), but this is a first-pass for opinions.
In order to make it possible to notify the user of what happened, I added a facility for `GlobalStateSnapshot` to send *messages* to the client indicating what happened. There may be a cleaner way to do this as well but I wasn't sure exactly what might be best given this is my first time in this codebase.
It may be worth, longer term, working with `rustup` to provide a way to detect a missing component binary since `rustup` returns `1` if `rustfmt` is not installed, which is not ideal.
Co-authored-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@nikomatsakis@catamorphism@bors