rust-lang / rust-lang/rustup

Cargo `is not applicable` when using a toolchain specified in `rust-toolchain.toml`

Open
#3,104 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-concurrency bug
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
  1. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.