Ignore errors when declaring a registry on path dependency#12807
Ignore errors when declaring a registry on path dependency#12807w4 wants to merge 1 commit intorust-lang:masterfrom
Conversation
When depending on crate A from crate B, if crate A declares a `registry` on a path local dependency, cargo would attempt to resolve the registry name from crate B's config.toml, even though it would never be used and likely doesn't exist there.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @weihanglo (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
|
Thanks for being interested in this. For direct dependencies, if the registry configuration is missing, Cargo errors out. It seems a bit unfortunate that the behavior of transitive and direct dependencies can't be consistent after this changes. I'll propose this to the Cargo team for discussion. Before that, if you have any more thoughts please comment on the issue instead. |
|
Close as the current behaviour is expected. See #12271 (comment) and #12272 (comment) for more. Do let us know if there is something impossible to be resolved by those approaches mentioned. Thank you. |
|
Re-opened for #12272. To move forward, we need some more tests. This is how people usually do :
That make the intention clear when reviewing or reading the Git commit history. You might want to add some new tests around this |
|
☔ The latest upstream changes (presumably #13080) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@rustbot author |
|
☔ The latest upstream changes (possibly 081d7ba) made this pull request unmergeable. Please resolve the merge conflicts. |
|
As this has been waiting-on-author for quiet a while, I'm going to go ahead and close this. Feel free to resurrect these changes! |
When depending on crate A from crate B, if crate A declares a
registryon a path local dependency, cargo would attempt to resolve the registry name from crate B's config.toml, even though it would never be used and likely doesn't exist there.It may be wishful thinking to open a PR for this in its current form, but it fixes the exact issue outlined in #12271. I'm happy to modify it if there's a more "correct" fix out there.
Environment
Before
After