From 2abff94063ba9b6247217cbe3e478c97d6c7dad3 Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 20 Apr 2023 03:18:42 -0700 Subject: [PATCH] Re-add Guava to Bazel TestRunner It was removed in https://github.com/bazelbuild/bazel/commit/d6ad383a269cac720bfd1a76af87dd312b9313a7. Accidentally, this is a breaking change, because Guava is incorrectly added from TestRunner to Java library. Breaking change is preventing java_tools to be released and cherry-picked onto Bazel 6.2.0 I tested this manually on one of the downstream breakages. PiperOrigin-RevId: 525697087 Change-Id: Ic4ade4398ea422d982fe0fe96d2854ef5aeae568 --- .../junitrunner/java/com/google/testing/junit/runner/BUILD | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/BUILD b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/BUILD index fc90cba193d836..4c4ed5e1b405f1 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/BUILD +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/BUILD @@ -13,6 +13,10 @@ java_library( "BazelTestRunner.java", ], deps = [ + # Testrunner shouldn't be added to compile-time deps of java_library. + # Because of this removing Guava dependecy is a breaking change. + # TODO(b/113524892): Short time before Bazel LTS 7 is cut, remove Guava and release java_tools + "//third_party:guava", # build_cleaner: keep "//src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal", "//src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4", ],