Skip to content
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

Toolchain file not properly resolving Rust 1.79 #3953

Closed
2 tasks done
Rigidity opened this issue Jul 16, 2024 · 4 comments
Closed
2 tasks done

Toolchain file not properly resolving Rust 1.79 #3953

Rigidity opened this issue Jul 16, 2024 · 4 comments
Labels

Comments

@Rigidity
Copy link

Verification

Problem

I have the following rust-toolchain.toml file in my project:

[toolchain]
channel = "1.79"
components = ["rustfmt", "clippy"]

And when I run any cargo command, it fails with:

error: the 'cargo' binary, normally provided by the 'cargo' component, is not applicable to the '1.79-aarch64-apple-darwin' toolchain

Changing the rust-toolchain.toml to either of these resolves the issue (though is not what I want):

[toolchain]
channel = "1.78"
components = ["rustfmt", "clippy"]
[toolchain]
channel = "stable"
components = ["rustfmt", "clippy"]

Steps

  1. Create a new Rust project with cargo init
  2. Create a rust-toolchain.toml file and add channel = "1.79" to the [toolchain] section
  3. Run a cargo command (even with 1.79 installed, this fails)

Possible Solution(s)

No response

Notes

I have attempted to do all of the following before filing this bug:

  • Update Rustup
  • Reinstall Rustup
  • Update my toolchain
  • Reinstall both stable and 1.79
  • Reinstall the cargo and clippy components manually
  • Delete the ~/.rustup directory
  • Delete the ~/.cargo directory
  • Ensured that the toolchain does in fact contain the required components
  • Ensured that the installed version of Cargo is in fact 1.79

Rustup version

rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.79.0 (129f3b996 2024-06-10)`

Installed toolchains

Default host: aarch64-apple-darwin
rustup home:  /Users/rigidity/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin
1.79.0-aarch64-apple-darwin (default)
1.78-aarch64-apple-darwin
1.79-aarch64-apple-darwin

active toolchain
----------------

stable-aarch64-apple-darwin (overridden by '/Users/rigidity/Desktop/chia-rs/rust-toolchain.toml')
rustc 1.79.0 (129f3b996 2024-06-10)

OS version

MacOS 14.5
@Rigidity Rigidity added the bug label Jul 16, 2024
@Rigidity
Copy link
Author

I've cloned Rustup and added some debug logging and discovered that apparently I have two toolchain folders:

  • 1.79.0-aarch64-apple-darwin
  • 1.79-aarch64-apple-darwin

The former has cargo and the latter doesn't. But both have some somponents.

When I use 1.78, it resolves to the 1.78-aarch64-apple-darwin folder, but there is no duplication with this version, so it finds cargo fine.

@Rigidity
Copy link
Author

So changing it to channel = "1.79.0" works, but channel = "1.79" finds the wrong directory.

@Rigidity
Copy link
Author

This is reproducible by running rustup toolchain install 1.79 instead of rustup toolchain install 1.79.0
To me at least, these should resolve to the same thing until 1.79.1 is released? Not sure what the best path forward is here.

@rami3l
Copy link
Member

rami3l commented Jul 16, 2024

Duplicate of #3104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants