docs.rs
docs.rs copied to clipboard
Support using custom toolchains
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?
I'm not sure how this would work, combined with the custom nightly-only features that we are using?
"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.
I didn't know that, thank you for the explanation!