-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Support (restrictive) load in MODULE.bazel #17880
Copy link
Copy link
Closed
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)area-BzlmodBzlmod-specific PRs, issues, and feature requestsBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request
Milestone
Metadata
Metadata
Assignees
Labels
P2We'll consider working on this in future. (Assignee optional)We'll consider working on this in future. (Assignee optional)area-BzlmodBzlmod-specific PRs, issues, and feature requestsBzlmod-specific PRs, issues, and feature requeststeam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.External dependency handling, remote repositiories, WORKSPACE file.type: feature request
Type
Projects
Status
Done
Description of the feature request:
Currently, the
MODULE.bazelfile must contain everything needed by the project within it, and cannot callloadstatements to help make it easier to navigate.One situation in which it would be helpful to use
loadis when configuring external package managers, e.g. like withrules_jvm_external. On a Java project it is not unusual to depend on several external jars. Putting that configuration inMODULE.bazelcan be considered as polluting the file and makes it more difficult to maintain.This was originally opened in bazel-contrib/rules_jvm_external#854 and that issue provides further details on a specific example with
rules_jvm_external.Having the ability to use
loadto load constants or macros from other files would help us maintain a more organizedMODULE.bazel.What underlying problem are you trying to solve with this feature?
No response
Which operating system are you running Bazel on?
Linux
What is the output of
bazel info release?6.0.0
If
bazel info releasereturnsdevelopment versionor(@non-git), tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response