rust-lang / rust-lang/cargo-bisect-rustc

confusing experience with cargo args

Open
#46 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-errors A-ui bug
Dominant language
Rust
Stars
206
Forks
60
PR merge metrics
No merged PRs in 30d

Description

I wanted to bisect with a feature enabled in my project. I used this command:

cargo bisect-rustc -- --features=c_avx512

Of course, that's a mistake. I didn't realize that I should have -- build --features=c_avx512 instead of -- --features=c_avx512. However, the mistake was very non-obvious. cargo bisect-rustc just kept downloading older and older nightly versions. Only after I eventually added -vv did I get to see the very helpful error:

Found argument '--features' which wasn't expected, or isn't valid in this context

USAGE:
    cargo [OPTIONS] [SUBCOMMAND]

This is probably going to be a common experience for other folks new to the tool. Maybe it would be better to print all errors by default? Or somehow provide a discoverable fix for issues like the above?

Contributor guide

No contributing guide indexed for this repository

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 by reproducing the documented cargo bisect-rustc -- --features=c_avx512 invocation and compare it with cargo bisect-rustc -- build --features=c_avx512. Trace the command's argument and error-reporting entry points; done means this mistake produces a visible, actionable error without requiring -vv.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.