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
Problem
On platforms that don't have rustfmt and/or clippy, packages that use a rust-toolchain file that contains a toolchain that isn't already present on the host machine will fail because cargo does not call rustup with the --force option. e.g.
$ rustup toolchain install nightly-2019-10-02-powerpc64le-unknown-linux-gnu
info: syncing channel updates for 'nightly-2019-10-02-powerpc64le-unknown-linux-gnu'
info: latest update on 2019-10-02, rust version 1.40.0-nightly (702b45e40 2019-10-01)
error: some components unavailable for download for channel nightly-2019-10-02: 'clippy', 'rustfmt'
If you require these components, please install and use the latest successful build version,
which you can find at <https://rust-lang.github.io/rustup-components-history>.
After determining the correct date, install it with a command such as:
rustup toolchain install nightly-2018-12-27
Then you can use the toolchain with commands such as:
cargo +nightly-2018-12-27 build
This is problematic for 2 reasons. 1, it probably shouldn't happen at all unless the package actually depends on one of those tools, and 2, nothing in the above message says anything about --force being a thing, so it's not obvious how I can fix it. I had to ask on discord to figure that out.
So I think the right fix here is that if rustup decides to install a toolchain because it's missing (e.g. from an override) then we should force the installation so that it's more likely to succeed.
This ought to be a fairly small job to write (there're three sites which call install_from_dist() in the config.rs::Cfg code, and the one in update_all_channels() should be left alone. As such there are two sites to amend a boolean.
The difficulty will be in devising a nice set of tests to verify that this works. I'd be happy to mentor someone through this and I should be contacted on Discord if you want to help.
Problem
On platforms that don't have rustfmt and/or clippy, packages that use a rust-toolchain file that contains a toolchain that isn't already present on the host machine will fail because cargo does not call rustup with the --force option. e.g.
This is problematic for 2 reasons. 1, it probably shouldn't happen at all unless the package actually depends on one of those tools, and 2, nothing in the above message says anything about --force being a thing, so it's not obvious how I can fix it. I had to ask on discord to figure that out.
The text was updated successfully, but these errors were encountered: