-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-addS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.
Description
Problem
A user might cargo add fooo
when they mean cargo add foo
and get the wrong crate
Proposed Solution
When adding a new registry dependency, warn of dependencies that are an edit distance of 1-2 away from the specified crate. We should probably report their descriptions to hint to the user if the typo is for a different purpose. If the user didn't pass --offline
, ideally we'd also report download counts as a very low download count is a likely smell.
Notes
We might also want this for cargo search
(and cargo info
if/when that gets added, #948).
See also killercup/cargo-edit#172
weihanglo, xJonathanLEI, beeb and zohnannor
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-addS-triageStatus: This issue is waiting on initial triage.Status: This issue is waiting on initial triage.