-
Notifications
You must be signed in to change notification settings - Fork 431
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
Add support for all_crate_deps
when using bzlmod
#2461
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Sorry for the buildifier failures, wasn't sure exactly what command the buildkite workflow was running. Appears to be passing now! For anyone stuck in the future, try |
@illicitonion Judging by similar pull requests this seems like it might be in your arena? Could you please take a look when you have time? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks so much for the contribution!
bazelbuild#2461 changed the rendering of the hub repo to use canonical repository names, but incorrectly. Doing so wasn't necessary - instead we just need to do the resolution of the non-canonical label from the perspective of the hub repo rather than the consumer. Fixes bazelbuild#2483
#2461 changed the rendering of the hub repo to use canonical repository names, but incorrectly. Doing so wasn't necessary - instead we just need to do the resolution of the non-canonical label from the perspective of the hub repo rather than the consumer by using the `Label` constructor. Fixes #2483
This adds support for the
all_crate_deps
functionality in repositories created via bzlmod. An earlier update that added support for 3rd party crates with bzlmod intentionally left this functionality out.Some key things that I think should be reviewed:
crate_label_template
inextensions.bzl
the best approach? It requires a lot of hard-coding, and it seems like it might be possible to simplify but I'm not familiar enough with the code base to know how.generate_config_file
method fromcrates_vendor.bzl
the right method to use for generating the cargo-bazel config? It seems like there are two places with similar logic (here and incrates_repositories.bzl
(see Addrender_config
attribute tocrates_vendor
. #1832)