mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #13434 - epage:add-features, r=weihanglo
fix(add): Ensure users know a feature is being created Inspired by #13430 and #13411
This commit is contained in:
commit
30addeaa90
@ -208,6 +208,10 @@ pub fn add(workspace: &Workspace<'_>, options: &AddOptions<'_>) -> CargoResult<(
|
||||
let new_feature: toml_edit::Value =
|
||||
[format!("dep:{dep_name}")].iter().collect();
|
||||
table[dep_key] = toml_edit::value(new_feature);
|
||||
options
|
||||
.config
|
||||
.shell()
|
||||
.status("Adding", format!("feature `{dep_key}`"))?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +1,3 @@
|
||||
Updating `dummy-registry` index
|
||||
Adding my-package2 v99999.0.0 to optional dependencies.
|
||||
Adding feature `some-package`
|
||||
|
@ -1 +1,2 @@
|
||||
Adding foo (workspace) to optional dependencies.
|
||||
Adding feature `foo`
|
||||
|
@ -1,2 +1,3 @@
|
||||
Updating `dummy-registry` index
|
||||
Adding my-package v0.1.0 to optional dependencies.
|
||||
Adding feature `my-package`
|
||||
|
@ -1 +1,2 @@
|
||||
Adding cargo-list-test-fixture-dependency (local) to optional dependencies.
|
||||
Adding feature `cargo-list-test-fixture-dependency`
|
||||
|
@ -1 +1,2 @@
|
||||
Adding foo (workspace) to optional dependencies.
|
||||
Adding feature `foo`
|
||||
|
@ -2,3 +2,4 @@
|
||||
Features:
|
||||
+ mouth
|
||||
+ nose
|
||||
Adding feature `your-face`
|
||||
|
@ -1,2 +1,3 @@
|
||||
Updating `dummy-registry` index
|
||||
Adding my-package v0.1.0 to optional dependencies.
|
||||
Adding feature `my-package`
|
||||
|
@ -1,2 +1,3 @@
|
||||
Updating `dummy-registry` index
|
||||
Adding my-package v0.1.0 to optional dependencies.
|
||||
Adding feature `my-package`
|
||||
|
@ -2,3 +2,4 @@
|
||||
Features:
|
||||
+ mouth
|
||||
+ nose
|
||||
Adding feature `your-face`
|
||||
|
@ -1,2 +1,3 @@
|
||||
Updating `dummy-registry` index
|
||||
Adding cargo-list-test-fixture-dependency v20.0 to optional dependencies.
|
||||
Adding feature `cargo-list-test-fixture-dependency`
|
||||
|
@ -1,2 +1,3 @@
|
||||
Updating `dummy-registry` index
|
||||
Adding versioned-package v0.1.1 to optional dependencies.
|
||||
Adding feature `a1`
|
||||
|
@ -1,3 +1,4 @@
|
||||
Updating git repository `[ROOTURL]/versioned-package`
|
||||
Adding versioned-package (git) to optional dependencies.
|
||||
Adding feature `versioned-package`
|
||||
Updating git repository `[ROOTURL]/versioned-package`
|
||||
|
@ -1 +1,2 @@
|
||||
Adding cargo-list-test-fixture-dependency (local) to optional dependencies.
|
||||
Adding feature `cargo-list-test-fixture-dependency`
|
||||
|
Loading…
x
Reference in New Issue
Block a user