-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Warn if dependency doesn't have library target kind #6702
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I concur that this is confusing and should result in a warning (especially since there usually is
|
I'd be interested in implementing this. @rustbot claim |
Unfortunately, I no longer have the time to work on this. @rustbot release-assignment |
@rustbot claim |
@ehuss I'm trying to add this warning, but I can't find anywhere to add it when resolving dependencies. Could you help with some hints? |
Hm, I'm not sure exactly where would be the best place. Essentially, it needs to iterate over the workspace member IDs, call There are a few places where it could do that. I think one place would be the bottom of |
Thanks for your help! Created a PR for it. |
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.
The text was updated successfully, but these errors were encountered: