You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recent versions of Bazel support a feature called "Bzlmod" which changes how external dependencies are managed. This is opt-in in Bazel 6 (our current version), opt-out in Bazel 7, and required in future versions.
We will eventually need to move to Bzlmod to keep up with Bazel and the ecosystem. It will also likely be required for multitop so that we can use things from old versions of the repo without conflicts.
Bzlmod overview
Currently, we have a WORKSPACE file which downloads all external dependencies as tarballs and extracts them into a global namespace.
This is fragile and difficult to maintain. All dependencies (including transitive) must be accounted for by our WORKSPACE.
The global namespace causes conflicts and increases the chance of breakage.
With Bzlmod, our repository becomes a "module" depending on other modules.
Modules are namespaced and transitive dependencies are handled automatically.
Extra features become available due to this uniformity.
Roadmap
The steps for adopting bzlmod are roughly:
Ensure all our dependencies support bzlmod. Mostly done.
Full RFC document: https://docs.google.com/document/d/1KQWdo7jeh9JmKn3OgNA-xFYLfR2hyMyJXlL_Rqadnjc/edit?usp=sharing
Summary
Recent versions of Bazel support a feature called "Bzlmod" which changes how external dependencies are managed. This is opt-in in Bazel 6 (our current version), opt-out in Bazel 7, and required in future versions.
We will eventually need to move to Bzlmod to keep up with Bazel and the ecosystem. It will also likely be required for multitop so that we can use things from old versions of the repo without conflicts.
Bzlmod overview
WORKSPACE
file which downloads all external dependencies as tarballs and extracts them into a global namespace.WORKSPACE
.Roadmap
The steps for adopting bzlmod are roughly:
rules_cc
features for the lowRISC toolchain.rules_rust
to upstream 0.49.3 #24587 -rules_rust
.WORKSPACE.bzlmod
andMODULE.bazel
.WORKSPACE.bzlmod
toMODULE.bazel
.rules_rust
: [bazel] Migraterules_rust
to bzlmod #25578rules_python
: [bazel] Migraterules_python
and dependents to bzlmod #25650Most of this work is being experimented with in #24216.
The text was updated successfully, but these errors were encountered: