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

[bazel] Migrating to Bzlmod #24365

Open
8 of 16 tasks
jwnrt opened this issue Aug 20, 2024 · 2 comments
Open
8 of 16 tasks

[bazel] Migrating to Bzlmod #24365

jwnrt opened this issue Aug 20, 2024 · 2 comments
Assignees
Labels

Comments

@jwnrt
Copy link
Contributor

jwnrt commented Aug 20, 2024

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

  • 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:

Most of this work is being experimented with in #24216.

@andreaskurth
Copy link
Contributor

RFC approved by TC on 2024-11-14

@jwnrt are the open tasks above still up-to-date, or can this issue be closed as completed?

@jwnrt
Copy link
Contributor Author

jwnrt commented Dec 17, 2024

I’ve updated the list with the current progress and next steps. I’ll keep this open until they’re all completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants