From 2eea38e52e0ef129ada20a18f3a54f861aee1305 Mon Sep 17 00:00:00 2001 From: Mike Kruskal <62662355+mkruskal-google@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:39:03 -0700 Subject: [PATCH] Fix Bazel 4 support (#10438) * Downgrade a presubmit to Bazel 4.0.0 to reproduce failure * Add explicit dependency on more recent platforms package * Upgrade to Bazel 4.2.2, the oldest supported version --- WORKSPACE | 8 ++++++++ kokoro/linux/benchmark/run.sh | 4 ++-- kokoro/linux/java_linkage_monitor/build.sh | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 20e7415a62..b50f2aeb20 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -25,6 +25,14 @@ http_archive( ], ) +# Bazel platform rules. +http_archive( + name = "platforms", + sha256 = "a879ea428c6d56ab0ec18224f976515948822451473a80d06c2e50af0bbe5121", + strip_prefix = "platforms-da5541f26b7de1dc8e04c075c99df5351742a4a2", + urls = ["https://github.com/bazelbuild/platforms/archive/da5541f26b7de1dc8e04c075c99df5351742a4a2.zip"], # 2022-05-27 +) + # Load common dependencies. load("//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS", "protobuf_deps") protobuf_deps() diff --git a/kokoro/linux/benchmark/run.sh b/kokoro/linux/benchmark/run.sh index 4a4ddb9373..960f9d590a 100755 --- a/kokoro/linux/benchmark/run.sh +++ b/kokoro/linux/benchmark/run.sh @@ -1,7 +1,7 @@ #!/bin/bash # -# Install Bazel 4.0.0. -use_bazel.sh 4.0.0 +# Install Bazel 4.2.2. +use_bazel.sh 4.2.2 # Change to repo root cd $(dirname $0)/../../.. diff --git a/kokoro/linux/java_linkage_monitor/build.sh b/kokoro/linux/java_linkage_monitor/build.sh index fd1c5c7fa9..7d4d7b7fd4 100755 --- a/kokoro/linux/java_linkage_monitor/build.sh +++ b/kokoro/linux/java_linkage_monitor/build.sh @@ -6,7 +6,7 @@ # This script selects a specific Dockerfile (for building a Docker image) and # a script to run inside that image. -use_bazel.sh 5.1.1 +use_bazel.sh 4.2.2 # Change to repo root cd $(dirname $0)/../../..