Cargo `is not applicable` when using a toolchain specified in `rust-toolchain.toml`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Problem
I'm experiencing an issue very similar to https://github.com/rust-lang/rustup/issues/3025
In Nushell, we currently use this in our rust-toolchain.toml:
[toolchain]
profile = "default"
channel = "1.64.0"
On my mac, this is now broken:
❯ cargo install --path . --features=extra
error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the '1.64.0-aarch64-apple-darwin' toolchain
Strangely enough, if I change channel = "1.64.0" to channel = "1.64" it fixes the issue but breaks other platforms. It almost seems like there's a naming issue that got published.
Steps
- Described above
Possible Solution(s)
It should be possible to use rust-toolchain.toml to request an earlier version of the Rust compiler using the full version number across platforms.
Notes
No response
Rustup version
rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.64.0 (a55dd71d5 2022-09-19)`
Installed toolchains
❯ rustup show
Default host: aarch64-apple-darwin
rustup home: /Users/jt/.rustup
installed toolchains
--------------------
stable-aarch64-apple-darwin (default)
nightly-2022-01-20-aarch64-apple-darwin
nightly-2022-10-20-aarch64-apple-darwin
nightly-aarch64-apple-darwin
1.64-aarch64-apple-darwin
1.56.0-aarch64-apple-darwin
1.61.0-aarch64-apple-darwin
1.63.0-aarch64-apple-darwin
1.64.0-aarch64-apple-darwin
active toolchain
----------------
1.64.0-aarch64-apple-darwin (overridden by '/Users/jt/Source/nushell/rust-toolchain.toml')
rustc 1.64.0 (a55dd71d5 2022-09-19)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided rust-toolchain.toml on an aarch64-apple-darwin host, using channel "1.64.0" and the cargo install --path . --features=extra command. Compare it with channel "1.64" and inspect rustup's toolchain resolution and target naming; done means the full version works across platforms without making the cargo component inapplicable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100