rust
rust copied to clipboard
rustfmt Not Downloaded Until Manual `x.py fmt`
As of #97507 rustfmt is not downloaded until the user runs x.py fmt. The rustc dev guide suggests setting the formatter to the rustfmt that is downloaded for stage0 in the build directory, but that is no longer downloaded with any other x.py commands.
@jyn514 (sorry for the delay in making this issue)
@rustbot claim
Hi @reez12g, have you had time to work on this? Let me know if anything is confusing and I'm happy to help out :)
@jyn514 Thank you!! Sorry for the delay in catching up.
Am I correct that this Issue is about "at some point, make sure to automatically download rustfmt"? If so, I'm still not sure which file to fix.
I think I somehow understood that this Issue is related to this (i.e., no dependence on python scripts?)
I think I somehow understood that this Issue is related to this (i.e., no dependence on python scripts?)
That was the motivation for https://github.com/rust-lang/rust/pull/97507, right, we want to move all the logic out of the python script eventually.
Am I correct that this Issue is about "at some point, make sure to automatically download rustfmt"?
Not just at some point - it should be done on every invocation of bootstrap (assuming it hasn't been downloaded yet). Right now we only download it when someone runs x.py fmt.
If so, I'm still not sure which file to fix.
If you look at the PR I linked, it's currently in format.rs - I think moving it a line early to https://github.com/rust-lang/rust/blob/6115f4eba458e763370119b2a10a73ef595583bc/src/bootstrap/lib.rs#L679 would be a good approach.
Is this picked up or shall i work on it? @jyn514
@zsfVishnu no, @reez12g is already working on it.
cool