Skip to content

builds fail due to missing components on non tier 1 platforms using the default profile #2068

@estokes

Description

@estokes

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.

$ rustup --version
rustup 1.20.2 (13979c968 2019-10-16)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions