Cargo search using maximum result limit hardcodes the crates.io URL
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Problem
When using cargo search against a private registry with --limit 100, I expect the message directing me to additional search results to contain the URL for my private registry.
Instead, the URL appears to be hard-coded here to direct users to crates.io.
Steps
- Upload a package to a registry other than crates.io
- Use
cargo search --registry your-registry --limit 100 test_package - Receive the message directing you to
https://crates.io/search?q=test%5Fpackage
Possible Solution(s)
Use the registry index for this message instead of hard-coding the string
Notes
Output of cargo version:
cargo 1.40.0 (bc8e4c8be 2019-11-22)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/cargo/ops/registry.rs around line 770 and reproduce the issue with cargo search --registry your-registry --limit 100 test_package. Trace how the registry is selected and how the additional-results message is built. Done means the message uses the selected private registry URL instead of always directing users to crates.io.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100