-
Notifications
You must be signed in to change notification settings - Fork 952
rust-toolchain should allow setting the equivalent of --profile minimal
#2579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does running |
Good idea. Yes, that does work.
@kinnison Do you still want this enhancement? |
Actually, as part of making a PR to fix it, I've learned that the concept of "profile" is at the global rustup level, not per toolchain. $ cat ~/.rustup/settings.toml
default_host_triple = "x86_64-unknown-linux-gnu"
default_toolchain = "nightly-x86_64-unknown-linux-gnu"
profile = "minimal"
version = "12"
[overrides] So this really doesn't make sense in a rust-toolchain file after all. Running |
It probably would make sense to default to minimal profile in a CI setting anyway, although that might be a breaking change :( |
It'd involve modifying |
I would still like this change - rustdoc is looking into building out of tree, and it needs neither clippy nor rustfmt, since clippy isn't used at all and rustfmt will be the wrong version (rust-lang/rust#76419 (comment)). It would be nice not to download them if they'll never be used. |
Describe the problem you are trying to solve
For things like CI that can make do with the minimal profile but also need additional components, I usually do something like this to install the desired toolchain:
The new TOML format allows this to be skipped since the first invocation of
rustc
/cargo
will auto-install the toolchain with the required components, except that it does so using the default profile and thus also installsrust-docs
.Describe the solution you'd like
It would be nice if, when rustup installs a new toolchain as a result of a discovered TOML rust-toolchain file, it either defaults to using the minimal profile if
components
is specified (too late now perhaps due to backward compatibility), or the TOML has aprofile
field I can set to"minimal"
, or some other way.The text was updated successfully, but these errors were encountered: