-
Notifications
You must be signed in to change notification settings - Fork 893
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
Command for "install stuff from rust-toolchain.toml
"
#2686
Comments
See #1397 |
I feel like there's value in keeping this issue different from #1397 for a couple of reasons:
|
I think that ensuring You're right that #1397 is about ensuring that we don't over-indulge in autoinstallation, and I think this is a good home for how we then permit manual triggering of what was previously automatic. I continue to think something like |
I'm easy about the syntax. I was thinking re-using
|
Given all the other arguments |
There's a request to permit this during rustup-init as well; I've marked them as dup because I think its basically the same work... getting to a oneline for rustup not being installed is doable via: |
I'd also like to have
Since my I could resolve this by manually keeping my CI scripts in-sync with my |
@eminence just use |
Ah, sorry, I didn't know that was possible! I didn't see it listed in |
Given someone has actually started trying to implement this functionality, should we agree on syntax? Based on the above, people seem to be keen for a new verb and have been using As for exact syntax, based on my suggestion above I'd suggest:
I'd also suggest a confirmation prompt by default, listing the path to the file it's using and what it's about to install, with a Are people happy with this? Anything we want to change? |
I want to chime in with a big yes for this. One reason I've been holding off on moving from the legacy If I could stash a CI-specific toolchain file in On a similar note, some of my projects use e.g. nightly rustdoc for building crate docs or nightly rustfmt which I invoke like:
Unfortunately this invocation doesn't let me specify components to install on the nightly toolchain and makes it more difficult to onboard new contributors to local development. Is something like |
Fantastic, works as expected. Thank you! |
@lopopolo at least in my view, the toolchain file shouldn't be used to specify components for developers: there is plenty of legitimate variance (e.g. docs for windows users are expensive in terms of performance, docs for unix machines are not very useful when the developer is using a remote system (e.g. vscode remote or intellij remote) to develop, and their browser is not local. The toolchain is a very blunt hammer, and as such one should be minimalist with its use, which lines up with your desire to only install some components in CI. Using it for trivial setups like 'stable' or '1.54' won't - ever IMO - work well. The rust-version entry in cargo.toml is a much better fit for developer experience: it ensures a minimum version, not an exact version. I think its quite certain we will do an active verb to install a toolchain compatible with the local directory, coupled to the work to stop e.g. 'rustup show' implicitly installing things. Having that optionally accept a toolchain file seems reasonable too, but I don't expect that to resolve the tension folk are feeling when they are using toolchain files today. |
Any thoughts on the plan from this post? I'd be happy to work on a PR if this is agreed (modulo bikeshedding on the exact subcommand name, which can be changed very easily). |
Moves the nightly toolchain we use for linting out of a GitHub action and into a dedicated `rust-toolchain.lint.toml` file. rustup doesn't currently support specifying a toolchain file, though [it will soon](rust-lang/rustup#2686), so we hack around it by moving the toolchain file back and forth as part of the GitHub action for Rust.
* Codify linting toolchain in a toolchain file Moves the nightly toolchain we use for linting out of a GitHub action and into a dedicated linting `rust-toolchain.toml` file. rustup doesn't currently support specifying a toolchain file, though [it will soon](rust-lang/rustup#2686), so we hack around it by keeping the toolchain files in separate directories. * Add a Nix devShell for the linting toolchain
@jmaargh I think adding an |
Moves the nightly toolchain we use for linting out of a GitHub action and into a dedicated `toolchains/lint/rust-toolchain.toml` file. rustup doesn't currently support specifying a toolchain file, though [it will soon](rust-lang/rustup#2686), so we hack around it by moving the toolchain file back and forth as part of the GitHub action for Rust.
@djc Are you a maintainer? I don't want to start working until maintainers have agreed in principle. |
Yes (and so am I). Please go ahead with it! 🙏 |
Moves the nightly toolchain we use for linting out of a GitHub action and into a dedicated `toolchains/lint/rust-toolchain.toml` file. rustup doesn't currently support specifying a toolchain file, though [it will soon](rust-lang/rustup#2686), so we hack around it by moving the toolchain file back and forth as part of the GitHub action for Rust.
Moves the nightly toolchain we use for linting out of a GitHub action and into a dedicated `toolchains/lint/rust-toolchain.toml` file. rustup doesn't currently support specifying a toolchain file, though [it will soon](rust-lang/rustup#2686), so we hack around it by moving the toolchain file back and forth as part of the GitHub action for Rust.
Moves the nightly toolchain we use for linting out of a GitHub action and into a dedicated `toolchains/lint/rust-toolchain.toml` file. rustup doesn't currently support specifying a toolchain file, though [it will soon](rust-lang/rustup#2686), so we hack around it by moving the toolchain file back and forth as part of the GitHub action for Rust.
* Codify linting toolchain in a toolchain file Moves the nightly toolchain we use for linting out of a GitHub action and into a dedicated `toolchains/lint/rust-toolchain.toml` file. rustup doesn't currently support specifying a toolchain file, though [it will soon](rust-lang/rustup#2686), so we hack around it by moving the toolchain file back and forth as part of the GitHub action for Rust. * Update code for recent clippy * Update code for recent rustfmt * Add a Nix devShell for the linting toolchain
Apologies if this already exists, but I couldn't find it in the docs or shell help. Or if there is an alternate workflow for this.
I love
rust-toolchain.toml
, it's a great idea. It would be even more useful if there were a command such asrustup override install
, which would look at the currentrust-toolchain.toml
and install the toolchain and components specified there. It would be super useful both when exploring projects for the first time, but also when using disposable container-based development environments.I'm unopinionated on the exact syntax of this command. Also happy to help implement this if the maintainers want it.
Tasks
rustup default
doesn't show proper warning when architecture is not compatible #3972The text was updated successfully, but these errors were encountered: