rust-lang / rust-lang/rustup

"cargo install --path PATH" doesn't look at rust-toolchain

Open
#3,115 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
22h 40m
Merged PRs (30d)
46

Description

Problem

I found a project (for curious: it is https://github.com/xldenis/creusot ). Their installation instructions told me to install the project using cargo install --path PATH. The project supplied rust-toolchain file. Unfortunately, cargo install --path PATH doesn't pick up rust-toolchain file. So, please, make cargo install --path PATH command to use PATH/rust-toolchain file.

Also: even if you fix this bug, creusot still will not work properly. Because, it seems they did everything wrong. Their rust-toolchain file has rust-toolchain.toml syntax (in current master). (Edit: despite wrongly named file everything seems to work.) Still I think that this rustup/cargo bug is a real bug

Steps

Here are exact steps to reproduce: https://builds.sr.ht/~safinaskar/job/890917 . You can click "view manifest »" to see full script. As you can see, the last command (cargo install --path=a) doesn't install stable toolchain (but it must install it)

Possible Solution(s)

No response

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.67.0-nightly (b3bc6bf31 2022-11-24)`
Installed toolchains
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/build/.rustup

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.67.0-nightly (b3bc6bf31 2022-11-24)

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

Start with the exact reproduction script linked in the issue and the cargo install --path=a entry point. Trace how the install path is handled relative to rust-toolchain discovery; done means installing from PATH uses the toolchain specified by PATH/rust-toolchain.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.