Mike Bland

Bzlmod: Maintaing Compatibility, Part 1

I've published my ninth EngFlow Bzlmod blog post, about keeping a Bazel module compatible with WORKSPACE builds and a range of dependency versions. Also, I'll be teaching a Bzlmod Migration Bootcamp at BazelCon in November.


Tags: Bazel, Bzlmod, EngFlow, technical

My ninth EngFlow Bzlmod blog post is about ensuring that “library” modules that other projects depend upon maintain compatibility with WORKSPACE and older dependencies. This makes it so users can upgrade to a new, Bzlmod compatible version of your project, without having to use Bzlmod or update other dependencies. The idea being, this makes it easier for users to take a step closer to Bzlmod compatibility, without potentially unleashing immediate chaos.

The next two Bzlmod blog posts will describe:

  • writing tests that work under WORKSPACE, Bzlmod, different Bazel versions, and the latest dependency versions

  • writing smoke tests for dependency version compatibility, and running tests locally and in continuous integration

All of this is based on my experience making rules_scala v7.0.0 Bzlmod compatible (per bazel-contrib/rules_scala#1482). The work paid off handsomely; I’ve received good feedback, and the only substantial rules_scala issues since have been minor and not Bzlmod related. (I’ve landed a few fixes and have a couple more open.)

Also, FYI, I’ll be teaching a Bzlmod Migration Bootcamp at BazelCon in Atlanta, Georgia on November 9, 2025. Check out the recent EngFlow LinkedIn post advertising the session as well. As evidenced by all my EngFlow Bzlmod blog posts, there’s a lot of information to cover. I’m already working on trying to cram in as much as I can without it being either overwhelming or too vague to be useful. We’ll see what I come up with.

As always, feel free to comment on the LinkedIn announcement corresponding to this post or the Bzlmod Slack announcement in the #bzlmod channel.