You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rustfmt toolchain repository downloads a second rustc #4441
rustfmt_toolchain_tools_repository downloads and unpacks the rustc component next to rustfmt (since #1769) because rustfmt loads librustc_driver relative to its own path. That is about 400 MB unpacked per execution platform.
When rustfmt_version is the release the Rust toolchains compile with (for example rust.toolchain(versions = ["1.99.1"], rustfmt_version = "1.99.1"), or WORKSPACE rust_register_toolchains with a single version, where rustfmt_version defaults to it), the same rustc is already in the shared <name>__<channel>__rustc repository added in #4397. Any build that runs rustfmt then holds two copies.
Proposal: pass that compiler repository to the rustfmt repository as rustc_anchor and link its lib/ beside rustfmt, the way the Clippy repository already does, instead of downloading rustc again. Only do this for the default channel's release, so a nightly rustfmt does not pull the nightly compiler repository (with its standard library and llvm-tools) into stable builds.
Activity