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

Add support for use_repo_rule in MODULE.bazel files #19629

Closed
wants to merge 1 commit into from

Conversation

Wyverald
Copy link
Member

This CL introduces a new directive in the MDOULE.bazel file, use_repo_rule, which is a convenient way to declare repos that are only visible to the current module. See #17141 (comment) for example usage.

Under the hood, this is implemented as an "innate" module extension for each module that uses use_repo_rule. The ID of this extension is a fake one: with the bzl file label of @@name~version//:MODULE.bazel and name of __innate. Each tag of this extension corresponds to a repo. The name of the tag is the string ${repo_rule_bzl_label}%${repo_rule_name}, and the attributes of the tag are the attributes of the repo.

Fixes #17141.

@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. labels Sep 25, 2023
This CL introduces a new directive in the MDOULE.bazel file, `use_repo_rule`, which is a convenient way to declare repos that are only visible to the current module. See #17141 (comment) for example usage.

Under the hood, this is implemented as an "innate" module extension for each module that uses `use_repo_rule`. The ID of this extension is a fake one: with the bzl file label of `@@name~version//:MODULE.bazel` and name of `__innate`. Each tag of this extension corresponds to a repo. The name of the tag is the string `${repo_rule_bzl_label}%${repo_rule_name}`, and the attributes of the tag are the attributes of the repo.

Fixes #17141.

PiperOrigin-RevId: 567722226
Change-Id: I16b8dc562dd20a676118867d831d3b2f5631f767
@copybara-service copybara-service bot closed this in ab016be Oct 9, 2023
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Oct 9, 2023
@Wyverald Wyverald deleted the wyv-innate branch November 9, 2023 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow http_archive directly in MODULE.bazel
3 participants