-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
cargo install
ignores the rust-toolchain.toml
or uses the wrong one
#11036
Comments
I believe Another angle on this is that |
See also #7312 |
Unfortunately the cargo install command does not seem to respect the rust-toolchain.toml and .cargo/config.toml settings when installing from a git reference. rust-lang/cargo#11036 We need to fix this by adding +nightly and specifying -Z bindeps in the cargo install command for twoliter.
Unfortunately the cargo install command does not seem to respect the rust-toolchain.toml and .cargo/config.toml settings when installing from a git reference. rust-lang/cargo#11036 We need to fix this by adding +nightly and specifying -Z bindeps in the cargo install command for twoliter. (cherry picked from commit 8323260)
btw I was wrong about See cargo/src/bin/cargo/commands/install.rs Lines 104 to 109 in 350098d
This was then mirrored in "cargo script". "cargo script" would likely benefit from a solution to this as well but .we need someone to take the time to design this. |
Some options
|
We talked about this in today's cargo team meeting. There is some concern about breaking the abstraction layer. We do so now but its mostly for errors and performance. The This would only be limited for when being run under If we went the route of cargo doing a toolchain lookup, there is concern about the toolchain specifying older versions that may have bugs or different behavior, especially if it can lead to a infinite recursion. If we wanted to explore going down this route, a likely first step would be to provide a warning that the toolchain/override is being ignored with a suggestion on how to override it ( |
Problem
Hello,
Cargo simply ignores
rust-toolchain.toml
overrides when used by--git
option to install a crate and also it can wrongly use the current directoryrust-toolchain.toml
(even not related to the desired installing git repo) with or without--git
option.Steps
The first issue: install any crate from a git repo with
rust-toolchain.toml
in it, cargo ignores the overrides. For example:The second issue: if you are in a rust repo directory that has
rust-toolchain.toml
, trying to install another crate with or without--git
option, uses the current directoryrust-toolchain.toml
overrides:Possible Solution(s)
No response
Notes
This also applies to
rustup override
which is stored in a user config file.Version
The text was updated successfully, but these errors were encountered: