Upgrade bazel to 5.0.0
These are the commands I used to generate the bazel xz file:
$ wget 'https://github.com/bazelbuild/bazel/releases/download/5.0.0/bazel-5.0.0-linux-x86_64'
$ xz bazel-5.0.0-linux-x86_64
$ mv bazel-5.0.0-linux-x86_64.xz bazel_5.0.0.xz
I had to tweak `.bazelrc` a bit because some options were promoted
from experimental status to non-experimental status. A couple of
incompatible flags are gone now too.
I had to change some of our Java setup as per
https://github.com/bazelbuild/bazel/issues/7849. It's not obvious to
me that I did it correctly, but bazel doesn't seem to complain about
the new options I added.
The `--watchfs` in `tools/ci/buildkite.yaml` was generating this
error:
ERROR: --watchfs as startup option is deprecated, replace it with the equivalent command option. For example, instead of 'bazel --watchfs build //foo', run 'bazel build --watchfs //foo'.
As far as I can tell, the `common --watchfs` option in our `.bazelrc`
should cover this. So I deleted the option from our buildkite config.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ie85e68a1437c924d6dd4e7c4089e7d3d4e4cab90
diff --git a/tools/bazel b/tools/bazel
index e72b44e..da9008b 100755
--- a/tools/bazel
+++ b/tools/bazel
@@ -24,7 +24,7 @@
exec "${BAZEL_OVERRIDE}" "$@"
fi
-readonly VERSION="4.2.2"
+readonly VERSION="5.0.0"
readonly DOWNLOAD_DIR="${HOME}/.cache/bazel"
# Directory to unpack bazel into. This must change whenever bazel changes.