rust-lang / rust-lang/rustup

Help for proxy programs should somehow grant a peek behind The Matrix

Open
#2,285 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When rustup acts as a proxy (to cargo, rustc, any others?), it does too good a job of hiding itself. cargo --help gives no hint to noobs like me that there is somewhere else to look at (like rustup --help) to understand examples featuring a cargo +toolchain command.

cargo --help, or at least cargo +stable --help, should either:

  • Say up front or down below that they're a wrapper for cargo with an additional option.
  • List the +toolchain option among cargo's options (but still make clear that is not part of cargo, not documented there).
  • Pass a secret option to the proxy, and/or rely on cargo and others to document the option itself? I sure don't like it.
  • Do something else?

Looking at the code, this looks like a non-trivial job for the clap crate to be exploited at src/cli/proxy_mode.rs. Which I'll look into myself, unless someone says it's a bad idea or knows how already.

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 in src/cli/proxy_mode.rs and inspect how rustup forwards help requests for proxy programs such as cargo and rustc. Compare cargo --help and cargo +stable --help, then determine how the proxy relationship and +toolchain option should be exposed without misrepresenting cargo's own documentation. Done means the relevant help output explains where to find rustup's proxy documentation and includes appropriate coverage for the changed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
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.