Migrating to Bazel Modules (a.k.a. Bzlmod) - The Easy Parts
You may be aware that Bazel will remove support for WORKSPACE
in Bazel 9
in favor of Bazel Modules (a.k.a. Bzlmod). The current mainstream release
is Bazel 7.2.0, so there's plenty of time to migrate. However, there's no
time like the present to get started, to avoid further WORKSPACE
dependencies
and a pile of migration work in the future.
I recently completed the Bzlmod migration for EngFlow/example and our internal repos. This experience taught me a lot about Bzlmod and about migrating complex projects with challenging dependency issues that I'll share over a few blog posts. I'll also borrow from Sara Adams's earlier post, in which she described an example bzlmod migration based on EngFlow's Bazel Invocation Analyzer repo.