Commit Graph

3 Commits

Author SHA1 Message Date
Philipp Stephani 700c9ec92b
Improve compatibility with Bazel 6. (#499)
In Bazel 6, the doc parameter of the module_extension function doesn’t accept
None; cf. https://bazel.build/versions/6.5.0/rules/lib/globals#module_extension
vs. https://bazel.build/versions/7.0.0/rules/lib/globals/bzl#module_extension.
Instead of passing None in that case, just don’t pass the argument at all and
use the respective default.
2024-04-25 15:45:04 +02:00
Fabian Meumertzheim 1969278310
Mark `modules.as_extension` as `reproducible` (#497)
WORKSPACE macros are fully deterministic and thus a prime example of a `reproducible` module extension. This reduces clutter in `MODULE.bazel.lock`.
2024-04-24 23:26:33 +02:00
Fabian Meumertzheim 553c08dc60
Add helper functions for module extensions as `modules` (#456)
Adds a new module `modules` with two helper functions for module
extensions:

* `use_all_repos` makes it easy to return an appropriate
  `extension_metadata` from a module extension (if supported) to
  indicate that all repositories generated by the extension should be
  imported via `use_repo`.
* `as_extension` turns a WORKSPACE macro into a module extension that
  uses `use_all_repos` to automate the generation of `use_repo` calls.
2024-04-24 14:53:32 -04:00