-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Warn if dependency doesn't have library target kind #6702
Copy link
Copy link
Closed
Labels
A-crate-dependenciesArea: [dependencies] of any kindArea: [dependencies] of any kindA-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.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`E-easyExperience: EasyExperience: Easy
Metadata
Metadata
Assignees
Labels
A-crate-dependenciesArea: [dependencies] of any kindArea: [dependencies] of any kindA-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.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`E-easyExperience: EasyExperience: Easy
Type
Fields
Give feedbackNo fields configured for issues without a type.
When specifying a crate without a library target kind as a dependency, cargo currently just silently ignores it. For example:
Note that the dependency isn't even compiled. Clearly, Cargo has already decided to elide this crate in the dependency graph, but the cause is not obvious to the user. All this can be confusing if the user is expecting to be able to use the dependency. I think a warning message is in order.