docs.rs icon indicating copy to clipboard operation
docs.rs copied to clipboard

Support using custom toolchains

Open jyn514 opened this issue 4 years ago • 3 comments

I tried using a local build of rust-lang/rust for testing, but rustwide gives an error while initializing:

2021/03/07 10:35:01 [INFO] rustwide::cmd: running `Command { std: "/home/joshua/docs.rs/.workspace/cargo-home/bin/rustup" "target" "list" "--installed" "--toolchain" "rustc2", kill_on_drop: false }`
Error: Building documentation failed

Caused by:
    failed to read the list of installed targets for rustc2 with rustup

Caused by:
    command failed: exit code: 1
$ "/home/joshua/docs.rs/.workspace/cargo-home/bin/rustup" "target" "list" "--installed" "--toolchain" "rustc2"
error: toolchain 'rustc2' does not support components
error: caused by: rustc2 is a custom toolchain

Not yet sure if this is a docs.rs bug or a rustwide bug - maybe the best solution is for rustwide to detect a custom toolchain and add a new error variant for that?

jyn514 avatar Mar 07 '21 15:03 jyn514

I'm not sure how this would work, combined with the custom nightly-only features that we are using?

syphar avatar Oct 24 '23 09:10 syphar

"custom toolchains" are a rustup concept that means "this toolchain was built from source instead of downloaded". as such, It's the responsibility of whoever built the toolchain to make sure it supports the flags. usually it's "nightly plus three custom commits" so I wouldn't expect too many problems, If a flag was added recently the person can just rebase their branch over rust-lang master.

jyn514 avatar Oct 24 '23 12:10 jyn514

I didn't know that, thank you for the explanation!

syphar avatar Oct 24 '23 13:10 syphar