Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better diagnostics when patching fails #7161

Open
jdm opened this issue Jul 22, 2019 · 2 comments
Open

Provide better diagnostics when patching fails #7161

jdm opened this issue Jul 22, 2019 · 2 comments
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.

Comments

@jdm
Copy link

jdm commented Jul 22, 2019

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.

@ehuss ehuss added A-diagnostics Area: Error and warning messages generated by Cargo itself. A-patch Area: [patch] table override labels Aug 20, 2019
@benesch
Copy link
Contributor

benesch commented Aug 22, 2019

I'm with you 100%—I've been real frustrated by this! But this is arguably a duplicate of #6341?

@jdm
Copy link
Author

jdm commented Aug 22, 2019

It overlaps, but I think keeping them separate makes sense - this one is particularly focused on the poor diagnostics.

@epage epage added the S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted. label Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

4 participants