Bazel is evolving, and we will make changes to Bazel that at times will be incompatible and require some changes from Bazel users.
--incompatible_*
flag.--incompatible_*
flag we have a GitHub issue that explains the change in behavior and provides a migration recipe.--experimental_*
flag can change at any time.--experimental_*
or --incompatible_*
flags.In general, if an API or a behavior is available in Bazel without --experimental_...
flag, we consider it a stable, supported feature. This includes:
When we introduce an incompatible change, we try to make it easier for Bazel users to update their code. We do this by means of migration windows and migration recipes.
Migration window is one or more release of Bazel during which a migration from old functionality to new functionality is possible, according to a migration recipe.
During the migration window, both the old functionality and the new functionality are available in the Bazel release. For every incompatible change, we provide a migration recipe that allows updating the user code (BUILD
and .bzl
files, as well as any Bazel usage in scripts, usage of Bazel API and so on) in such a way that it works simultaneously without any flags with old and new functionality.
In other words, during a migration window for an incompatible change foo
:
--incompatible_foo
flag is available in Bazel release and defaults to off.--incompatible_foo=true
. However, their code will continue to work in the same release in default state (where --incompatible_foo
is off), as well after the migration window is over (at which point the flag will be effectively on).The primary source of information about incompatible changes are GitHub issues marked with an “incompatible-change” label.
For every incompatible change, the issue specifies the following:
The incompatible change issue is closed when the incompatible flag is flipped at HEAD.
All the incompatible changes for which a Bazel release X.Y is part of a migration window are marked with a label “migration-X.Y” label (for example migration-0.21).
All the incompatible changes that are expected to happen in release X.Y are marked with a label “breaking-change-X.Y” (for example breaking-change-0.21).