Mike Bland

Bzlmod: Maintaining Compatibility, Part 2

My tenth EngFlow Bzlmod blog post covers updating workspace configuration macros using Label to remain compatible with both legacy WORKSPACE and Bzlmod builds. It's a doozy.


Tags: Bazel, Bzlmod, EngFlow, technical

My tenth EngFlow Bzlmod blog post, the longest of the EngFlow Bzlmod series by far so far, appeared late yesterday. From this one topic, making toolchain configuration macros using Label compatible with Bzlmod and legacy WORKSPACE builds, came so many insights and possibilities. Once it got to a certain length, I thought about splitting it up, but it seemed like all this information really needed to stay together.

Many thanks to Mike Lundy for raising the issue and being tenacious enough to work through it with me. Many thanks to Jay Conrod for providing another thoughtful review, as usual, and inspiring me to emphasize the most straightforard of the solutions.

Now I promise that 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

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