cargo add <crate> --git=<repo> -F <feature>
results in "error: unrecognized feature for crate <crate>" for crates in a workspace
#13542
Labels
A-git
Area: anything dealing with git
C-bug
Category: bug
Command-add
S-needs-info
Status: Needs more info, such as a reproduction or more background for a feature request.
Problem
For crates in a workspace,
cargo add
with agit
flag andfeature
flag results in an "unrecognized feature" error.The error occurs if the dependency is being newly added or updated.
Discovered in the fluvio repository CI, but other workspace organized repositories seem to show the same problem.
Steps
cargo init .
cargo add fluvio --git=https://github.com/infinyon/fluvio.git -F admin
error: unrecognized feature for crate fluvio: admin
no features available for crate fluvio
fluvio = { features = ["admin"], git = "https://github.com/infinyon/fluvio.git" }
Possible Solution(s)
Manually adding the dependency works fine.
Notes
Other repos with using a workspace fail in the same way:
Repos that are not workspace organized seem to work fine:
Version
The text was updated successfully, but these errors were encountered: