From 4a8c4f4021bfc00b8a49f60c216ef8f639909ce9 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Fri, 1 May 2020 10:16:31 +0200 Subject: [PATCH] error: [RefersToDaggerCodegen] Don't refer to Dagger's internal or generated code This is a reproducer to the error reported by new error prone version 2.3.4. Note that due to this breakage the last attempt to upgrade Error Prone in Bazel was reverted: [1], [2]. Test Plan: On Linux run: $ bazel build \ --java_toolchain=@remote_java_tools_linux//:toolchain --host_java_toolchain=@remote_java_tools_linux//:toolchain src/main/kotlin/... Note, that this should be executed on Linux platform, because I have not built custom java_tool with this CL included: [3] on Mac Os X yet. [1] https://github.com/bazelbuild/bazel/issues/10023 [2] https://github.com/bazelbuild/bazel/commit/d990746fbd74334aee195dbdb2f6658f30108113 [3] https://github.com/bazelbuild/bazel/pull/11271 --- WORKSPACE | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 09b905cca..2c1725a1a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -13,6 +13,7 @@ # limitations under the License. workspace(name = "io_bazel_rules_kotlin") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("//kotlin:dependencies.bzl", "kt_download_local_dev_dependencies") kt_download_local_dev_dependencies() @@ -30,3 +31,29 @@ rbe_autoconfig( android_sdk_repository(name = "androidsdk") android_ndk_repository(name = "androidndk") + +http_archive( + name = "remote_java_tools_linux", + sha256 = "74d30ccf161c58bb69db9b2171c954a0563b2d1ff6f5831debbe71ced105c388", + urls = [ + "https://github.com/davido/java_tools/releases/download/javac11-v11.0/java_tools_javac11_linux-v11.0.zip", + ], +) + +http_archive( + name = "remote_java_tools_darwin", + sha256 = "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1", + urls = [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_darwin-v8.0.zip", + ], +) + +http_archive( + name = "remote_java_tools_windows", + sha256 = "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430", + urls = [ + "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip", + "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_windows-v8.0.zip", + ], +)