Migrating to Bazel Modules (a.k.a. Bzlmod) - Maintaining Compatibility, Part 4
This "Maintaining Compatibility" trilogy began by describing how to, well,
maintain compatibility with Bzlmod builds, legacy WORKSPACE
builds, and a
range of dependency versions. However, this was only half the story. Automated
testing is essential for validating our compatibility assertions, not lying to
ourselves and our users, and preventing the undoing of our hard work.
The previous post described how to write and run tests
that enable switching between Bazel versions and the Bzlmod and legacy
WORKSPACE
build modes. Those tests use the latest versions of our non-Bazel
dependencies to ensure forward compatibility.
This fourth and final part of our trilogy describes how to write tests to validate backwards compatibility with combinations of older dependency versions. We'll build on the techniques from the previous post, while learning what makes these backwards compatibility tests substantially different from other tests in the suite.