rust-lang / rust-lang/rustup

Unable to install rustfmt for a custom toolchain

Open
#2,153 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem
I'm building a custom rust toolchain to support bitcode under iOS using the scripts from: https://github.com/cowpaths/rust-bitcode/tree/fs-nightly-2019-09-05-llvm8 (which is a slightly modified fork of https://github.com/getditto/rust-bitcode )

The toolchain was installed using the command:

rustup toolchain link fs-2019-09-05-llvm8 ~/.fs-rust/toolchain-fs-2019-09-05-llvm8
rustup default fs-2019-09-05-llvm8

and everything seems to be fine. I can compile for iOS and for macosx using cargo build and cargo run. Now I'd like to install rustfmt. When I try:

rustup component add rustfmt

I get the following output:

error: toolchain 'fs-2019-09-05-llvm8' does not support components
error: caused by: invalid toolchain name: 'fs-2019-09-05-llvm8'

So my question is, what do I need to do to install rustfmt (and the next thing woul;d be clippy).

Steps
See above

Notes

Output of rustup --version:
rustup 1.20.2+125 (5f6317e9f 2019-12-03)

Output of rustup show:

Default host: x86_64-apple-darwin
rustup home:  /Users/davehylands/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin
nightly-2019-09-05-x86_64-apple-darwin
nightly-2019-09-13-x86_64-apple-darwin
nightly-x86_64-apple-darwin
fs-2019-09-05-llvm8 (default)
ios-arm64
1.37.0-x86_64-apple-darwin
1.38.0-x86_64-apple-darwin

active toolchain
----------------

fs-2019-09-05-llvm8 (default)
rustc 1.39.0-dev

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with rustup toolchain link, rustup component add rustfmt, and rustup show using the custom toolchain name. Trace how linked toolchains are identified during component installation; done means rustfmt, and subsequently clippy, can be installed or the command gives a clear supported limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.