Prepare to remove _LEGACY_ANY_TYPE_ATTRS workaround in java_toolchain
PiperOrigin-RevId: 837039389
Change-Id: Icc116e06e4e6cc88b826f5ceec50ed01426ea8bd
diff --git a/scripts/bootstrap/BUILD.bootstrap b/scripts/bootstrap/BUILD.bootstrap
index 110a161..2bed6d6 100644
--- a/scripts/bootstrap/BUILD.bootstrap
+++ b/scripts/bootstrap/BUILD.bootstrap
@@ -4,13 +4,13 @@
default_java_toolchain(
name = "bootstrap_toolchain",
bootclasspath = ["@rules_java//toolchains:platformclasspath_nostrip"],
- genclass = ["//src/java_tools/buildjar:bootstrap_genclass_deploy.jar"],
+ genclass = "//src/java_tools/buildjar:bootstrap_genclass_deploy.jar",
header_compiler = None, # avoid remote_java_tools dependency
header_compiler_direct = None, # ditto
- ijar = ["//third_party/ijar"],
+ ijar = "//third_party/ijar",
jacocorunner = None, # avoid remote_java_tools dependency
java_runtime = "@local_jdk//:jdk",
- javabuilder = ["//src/java_tools/buildjar:bootstrap_VanillaJavaBuilder_deploy.jar"],
+ javabuilder = "//src/java_tools/buildjar:bootstrap_VanillaJavaBuilder_deploy.jar",
jvm_opts = [
# Prevent "Could not reserve enough space for object heap" errors on Windows.
"-Xmx512m",
@@ -19,7 +19,7 @@
"-XX:TieredStopAtLevel=1",
],
oneversion = None, # avoid remote_java_tools dependency
- singlejar = ["//src/tools/singlejar:singlejar"],
+ singlejar = "//src/tools/singlejar:singlejar",
source_version = "21",
tags = ["manual"],
target_version = "21",
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/AutoExecGroupsTest.java b/src/test/java/com/google/devtools/build/lib/analysis/AutoExecGroupsTest.java
index a41f25c..328f65a9 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/AutoExecGroupsTest.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/AutoExecGroupsTest.java
@@ -2587,13 +2587,13 @@
" 'android': ['-XDandroidCompatible'],",
" },",
" tools = [':javac_canary.jar'],",
- " javabuilder = [':JavaBuilder_deploy.jar'],",
+ " javabuilder = ':JavaBuilder_deploy.jar',",
" jacocorunner = ':jacocorunner.jar',",
- " header_compiler = [':turbine_canary_deploy.jar'],",
- " header_compiler_direct = [':turbine_graal'],",
- " singlejar = ['singlejar'],",
- " ijar = ['ijar'],",
- " genclass = ['GenClass_deploy.jar'],",
+ " header_compiler = ':turbine_canary_deploy.jar',",
+ " header_compiler_direct = ':turbine_graal',",
+ " singlejar = 'singlejar',",
+ " ijar = 'ijar',",
+ " genclass = 'GenClass_deploy.jar',",
" timezone_data = 'tzdata.jar',",
" java_runtime = ':jvm-k8',",
" exec_compatible_with = ['@@//platforms:constraint_2'],",
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/mock/BazelAnalysisMock.java b/src/test/java/com/google/devtools/build/lib/analysis/mock/BazelAnalysisMock.java
index 1ce9eb8..931b5cc 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/mock/BazelAnalysisMock.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/mock/BazelAnalysisMock.java
@@ -150,14 +150,14 @@
java_toolchain(
name = "toolchain",
bootclasspath = [":bootclasspath"],
- genclass = ["GenClass_deploy.jar"],
- header_compiler = ["turbine_deploy.jar"],
- header_compiler_direct = ["TurbineDirect_deploy.jar"],
- ijar = ["ijar"],
+ genclass = "GenClass_deploy.jar",
+ header_compiler = "turbine_deploy.jar",
+ header_compiler_direct = "TurbineDirect_deploy.jar",
+ ijar = "ijar",
jacocorunner = ":JacocoCoverage",
java_runtime = "host_jdk",
- javabuilder = ["JavaBuilder_deploy.jar"],
- singlejar = ["singlejar"],
+ javabuilder = "JavaBuilder_deploy.jar",
+ singlejar = "singlejar",
source_version = "8",
target_version = "8",
)
@@ -165,14 +165,14 @@
java_toolchain(
name = "remote_toolchain",
bootclasspath = [":bootclasspath"],
- genclass = ["GenClass_deploy.jar"],
- header_compiler = ["turbine_deploy.jar"],
- header_compiler_direct = ["TurbineDirect_deploy.jar"],
- ijar = ["ijar"],
+ genclass = "GenClass_deploy.jar",
+ header_compiler = "turbine_deploy.jar",
+ header_compiler_direct = "TurbineDirect_deploy.jar",
+ ijar = "ijar",
jacocorunner = ":JacocoCoverage",
java_runtime = "host_jdk",
- javabuilder = ["JavaBuilder_deploy.jar"],
- singlejar = ["singlejar"],
+ javabuilder = "JavaBuilder_deploy.jar",
+ singlejar = "singlejar",
source_version = "8",
target_version = "8",
)
diff --git a/src/test/java/com/google/devtools/build/lib/rules/java/JavaTestUtil.java b/src/test/java/com/google/devtools/build/lib/rules/java/JavaTestUtil.java
index f82da4c9..facdac3 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/java/JavaTestUtil.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/java/JavaTestUtil.java
@@ -54,13 +54,13 @@
" 'android': ['-XDandroidCompatible'],",
" },",
" tools = [':javac_canary.jar'],",
- " javabuilder = [':JavaBuilder_deploy.jar'],",
+ " javabuilder = ':JavaBuilder_deploy.jar',",
" jacocorunner = ':jacocorunner.jar',",
- " header_compiler = [':turbine_canary_deploy.jar'],",
- " header_compiler_direct = [':turbine_graal'],",
- " singlejar = ['singlejar'],",
- " ijar = ['ijar'],",
- " genclass = ['GenClass_deploy.jar'],",
+ " header_compiler = ':turbine_canary_deploy.jar',",
+ " header_compiler_direct = ':turbine_graal',",
+ " singlejar = 'singlejar',",
+ " ijar = 'ijar',",
+ " genclass = 'GenClass_deploy.jar',",
" timezone_data = 'tzdata.jar',",
" java_runtime = ':jvm-k8'",
")",
diff --git a/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh b/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
index 2347501..831a7ac 100755
--- a/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
+++ b/src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
@@ -110,15 +110,15 @@
default_java_toolchain(
name = "fake_java_toolchain",
bootclasspath = [":dummy.jar"],
- genclass = [":dummy.jar"],
- header_compiler = [":dummy.jar"],
- header_compiler_direct = [":dummy.jar"],
- ijar = [":dummy.jar"],
+ genclass = ":dummy.jar",
+ header_compiler = ":dummy.jar",
+ header_compiler_direct = ":dummy.jar",
+ ijar = ":dummy.jar",
jacocorunner = ":dummy.jar",
java_runtime = "@local_jdk//:jdk",
- javabuilder = [":dummy.jar"],
+ javabuilder = ":dummy.jar",
oneversion = ":dummy.jar",
- singlejar = [":dummy.jar"],
+ singlejar = ":dummy.jar",
source_version = "${JAVA_VERSION}",
target_version = "${JAVA_VERSION}",
tags = ["manual"],
diff --git a/src/test/shell/bazel/bazel_java_test_defaults.sh b/src/test/shell/bazel/bazel_java_test_defaults.sh
index a9ba85df..5b0e219 100755
--- a/src/test/shell/bazel/bazel_java_test_defaults.sh
+++ b/src/test/shell/bazel/bazel_java_test_defaults.sh
@@ -164,7 +164,7 @@
load("@rules_java//toolchains:default_java_toolchain.bzl", "default_java_toolchain")
default_java_toolchain(
name = "vanilla",
- javabuilder = ["//:VanillaJavaBuilder"],
+ javabuilder = "//:VanillaJavaBuilder",
jvm_opts = [],
)
EOF
diff --git a/src/test/shell/integration/bazel_java_test.sh b/src/test/shell/integration/bazel_java_test.sh
index 237c407..0336f75 100755
--- a/src/test/shell/integration/bazel_java_test.sh
+++ b/src/test/shell/integration/bazel_java_test.sh
@@ -248,7 +248,7 @@
# Implicitly use the host_javabase bootclasspath, since the target doesn't
# exist in this test.
bootclasspath = [],
- javabuilder = ["@bazel_tools//tools/jdk:vanillajavabuilder"],
+ javabuilder = "@bazel_tools//tools/jdk:vanillajavabuilder",
jvm_opts = [],
visibility = ["//visibility:public"],
java_runtime = "@local_jdk//:jdk",