Bazel: Bazel 2.0 with breaking changes was released earlier than the promised three-month stability window

Created on 19 Dec 2019  路  5Comments  路  Source: bazelbuild/bazel

https://blog.bazel.build/2019/06/06/Bazel-Semantic-Versioning.html promises three-month stability window between major version releases.

Bazel 1.0.0 was released on Oct 10, Bazel 2.0 was released on Dec 19, which is 2 month 9 days after.

For users, who installed bazel as a linux package, it was updated auotmatically right after the release, starting breaking them immediately (in a very frustrating way, since they did not change anything in their projects).

team-XProduct untriaged

Most helpful comment

As a regular user, bazelisk is definitely the way to go. Pinning the version of your build tool is a very convenient thing that allows you to set your update schedule as you like.

All 5 comments

@dslomov @aehlig

Bazel does time-based, monthly releases. Bazel 1.0rc1 was cut in September, Bazel 1.1rc1 was cut in October, Bazel 1.2rc1 was cut in November and Bazel 2.0rc1 was cut in December. We don't count days between releases and artificially hold back a release to fulfil the three month window.

The fact that Bazel 1.0 was released later than expected due to bugs and some polish we wanted to do for this version does not "stop the train" for the following releases, which were cut and released on their expected and planned schedule. We considered doing that just once after Bazel 1.0, but figured it would be more confusing, rather than less.

Regarding automatic updates: There are various ways to solve this. I would recommend to use .bazelversion files if you require a fixed Bazel version for a specific project. Bazel 2.0 actually has much improved support for this: You can install individual Bazel versions side-by-side with the latest one via e.g. apt-get install bazel-1.2.1, which will install that version as /usr/bin/bazel-1.2.1.

If you add a .bazelversion file to your project: echo 1.2.1 > .bazelversion, Bazel's wrapper script that is installed by default as /usr/bin/bazel when you apt-get install bazel is smart enough to parse this and instead of using the latest, possibly incompatible version of Bazel, uses the /usr/bin/bazel-1.2.1 binary. If that doesn't exist, it prints a helpful message how to install it, tailored to your system.

Alternatively you could not use the binaries installed via apt-get, but use Bazelisk instead, which is the recommended solution for people who can use it (it does require internet access to fetch version information) and will handle this all automatically.

Hope this helps. As you're a Googler, you might also be interested in checking out b/133690867, where this exact problem was discussed and a solution has been provided.

As a regular user, bazelisk is definitely the way to go. Pinning the version of your build tool is a very convenient thing that allows you to set your update schedule as you like.

Is there any action item here, or shall we close the issue?

@laurentlb Please close it

Was this page helpful?
0 / 5 - 0 ratings