-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Ignore errors when declaring a registry on path dependency #12807
base: master
Are you sure you want to change the base?
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. |
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.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