Add --profile empty
support by kinnison · Pull Request #2974 · rust-lang/rustup (original) (raw)
Ok, I've had time to really think about this now.
I think ultimately this depends on whether the rust-analyzer folk want to:
- tightly couple ra to a toolchain, the same as cargo and rustfmt are coupled
- or be a layer above rustup (and/or distro toolchain packages etc)
For the former, we don't need this change.
For the latter, if they want ra to be installed via rustup, we need to design how the interactions with RUSTUP_TOOLCHAIN will work : a ra toolchain called (say) 'rust-analyser' will export RUST_TOOLCHAIN='rust-analyser'. Then rust-analyzer needs to reset that variable before building or interacting with rust - including support for directory overrides, path based toolchains and more.
My personal view is that just offering downloads, like rustup does, for rust-analyzer, and doing platform detection inside IDE plugins (e.g. the vscode plugin) then downloading the ra binary from there will be the most effective approach.
However, if the ra team decide they prefer dealing with RUST_TOOLCHAIN directly and and so on, we can reopen this and implement it then.
Work on hiding complete
would be good, but it isn't in this patch. So I'm going to close this as I know @kinnison is currently busy.