-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 add hangs on Adding to dependencies #11802
Comments
Thanks for the report, and interesting! It turns out that gitoxide has two features enabling each other —
I feel like adding a filter here may fix this issue. diff --git a/src/cargo/ops/cargo_add/mod.rs b/src/cargo/ops/cargo_add/mod.rs
index c22466399..5c519ac09 100644
--- a/src/cargo/ops/cargo_add/mod.rs
+++ b/src/cargo/ops/cargo_add/mod.rs
@@ -726,7 +726,8 @@ impl DependencyUI {
.get(next)
.into_iter()
.flatten()
- .map(|s| s.as_str()),
+ .map(|s| s.as_str())
+ .filter(|s| !activated.contains(s)),
);
activated.extend(
self.available_features |
@weihanglo thanks for the response. Do you feel that this is also an error with GitOxide itself, or just an error with Cargo? I would like to also post an issue to GitOxide if they made a mistake |
Not entirely sure but I think it's totally valid to have features depending on each other. When BTW, it seems that you probably don't want to |
Yes I think I agree, probably |
Great idea! Would you mind opening an issue for that? |
@rustbot claim |
Huh, never knew this was possible. Thanks for fixing for the report @4cq2 and the fix @jofas ! |
Problem
If I run this command, it completes in about 2 seconds:
if I run this command, it never completes:
I tried waiting for 5 minutes.
Steps
No response
Possible Solution(s)
No response
Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: