From a8a56f12d92510bf1e8948a4418456801a7e5766 Mon Sep 17 00:00:00 2001 From: Chris Heisterkamp Date: Sun, 14 Jan 2024 13:25:15 -0800 Subject: [PATCH] Add no-remote-cache tags to intermediate artifacts so rules_jvm_external works with --remote_download_toplevel set --- private/dependency_tree_parser.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/private/dependency_tree_parser.bzl b/private/dependency_tree_parser.bzl index 103fe5ebc..a68c6c34f 100644 --- a/private/dependency_tree_parser.bzl +++ b/private/dependency_tree_parser.bzl @@ -38,6 +38,7 @@ def _genrule_copy_artifact_from_http_file(artifact, visibilities): "genrule(", " name = \"%s_extension\"," % http_file_repository, " srcs = [\"@%s//file\"]," % http_file_repository, + " tags = [\"no-remote-cache\"],", " outs = [\"%s\"]," % file, " cmd = \"cp $< $@\",", ] @@ -182,6 +183,7 @@ def _generate_target( coordinates = artifact.get("maven_coordinates", artifact["coordinates"]) target_import_string.append("\ttags = [") + target_import_string.append("\t\t\"no-remote-cache\",") target_import_string.append("\t\t\"maven_coordinates=%s\"," % coordinates) if len(artifact["urls"]): target_import_string.append("\t\t\"maven_url=%s\"," % artifact["urls"][0])