Getting ready for the brave new Bazel Modules world

2025/09/29

Update 2025-10-19: I made a searchable index of modules available from my registry at https://www.hdlfactory.com/bazel-registry.

As Bazel 9.0 promises to disable the old dependency management approaches based on WORKSPACE by the end of 2025, I figured we should better start preparing. This is my preparation central.

Bazel modules promise to usher the era of trivial bazel dependency management. However, getting from here to there seems to be a journey fraught with peril. Migration guides are few and far between. And it’s never about the easy stuff what makes it fraught, it’s always the side quests and corner cases that create issues. Keep your knowledge base handy.

Realizations

I realized quickly that the overhead of migration can only be conquered by judiciously applying automation and simplification efforts.

In the past, we built jenga towers of dependencies, which we need to deconstruct and remake in the image of the new modules approach.

This is taking significant effort, but the effort is worth the gain to me.

To manage the migration complexity, I adopted a few conventions which allow me to decouple my work on migrating the modules from BCR and publication. See the “Standardization” section below.

Standardization

BCR requirements