Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo rm foo on error should suggest --dev or --build, if appropriate #12405

Closed
epage opened this issue Jul 27, 2023 · 4 comments · Fixed by #12865
Closed

cargo rm foo on error should suggest --dev or --build, if appropriate #12405

epage opened this issue Jul 27, 2023 · 4 comments · Fixed by #12865
Assignees
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-remove S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review

Comments

@epage
Copy link
Contributor

epage commented Jul 27, 2023

Problem

I just ran

$ cargo rm dunce
    Removing dunce from dependencies
error: the dependency `dunce` could not be found in `dependencies`.

Proposed Solution

It'd be nice if the error had a note saying that a --dev dependency existed

Notes

No response

@epage epage added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-remove S-triage Status: This issue is waiting on initial triage. labels Jul 27, 2023
@ehuss ehuss added S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review and removed S-triage Status: This issue is waiting on initial triage. labels Sep 25, 2023
@calavera
Copy link
Contributor

It'd be nice if the error had a note saying that a --dev dependency existed

If Cargo knows that the development dependency exists, isn't it more user friendly to remove it all together?

@epage
Copy link
Contributor Author

epage commented Oct 15, 2023

If you accidentally run cargo rm dunce twice, it shouldn't act as if you did cargo rm --dev dunce.

While "if the tool knew what I intended, it should just do it" is a great principle, I feel like over doing it could lead to some very wrong behavior.

@Rustin170506
Copy link
Member

@rustbot claim

@Rustin170506
Copy link
Member

I am working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-remove S-accepted Status: Issue or feature is accepted, and has a team member available to help mentor or review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants