Provide better diagnostics when patching fails #7161
Labels
A-diagnostics
Area: Error and warning messages generated by Cargo itself.
A-patch
Area: [patch] table override
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
There is one particular case I keep hitting that's a papercut for me. Servo uses a mixture of git and crates.io dependencies, and sometimes we end up switching between the two so it's easy to forget the true source of a dependency. When adding a patch, we either need a
[patch.crates-io]
or[patch."https://github.com/servo/whatever"]
. When I get this wrong, however, all I get is a message from Cargo that says that the patch was ignored. It seems like it should be possible for Cargo to notice when a patch matches the name of an existing dependency, check whether the patch source differs from the dependency's source and provide a better error message in that case.The text was updated successfully, but these errors were encountered: