Skip to content

Commit b64eb7d

Browse files
authored
[7.x] Revert bootstrap_runtime_toolchain_type changes (#247)
Copybara Import from #246 BEGIN_PUBLIC Revert `bootstrap_runtime_toolchain_type` changes (#246) This reverts the relevant bits from bcc5062 and 30ecf3f. The minimum supported Bazel version is now 6.4.0 which includes the type in `@bazel_tools`. Closes #246 END_PUBLIC COPYBARA_INTEGRATE_REVIEW=#246 from bazelbuild:hvd_tests_for_bootclasspath b666dc2 PiperOrigin-RevId: 702260069 Change-Id: Ie64994873a7b5609d4fb8b12a2472c82eb71493b (cherry picked from commit 4206c53) Conflicts: .bazelci/presubmit.yml MODULE.bazel test/repo/WORKSPACE
1 parent 2a9bd74 commit b64eb7d

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module(
22
name = "rules_java",
33
version = "7.12.2",
4-
bazel_compatibility = [">=6.2.0"],
4+
bazel_compatibility = [">=6.4.0"],
55
compatibility_level = 1,
66
)
77

test/repo/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ java_binary(
1414

1515
default_java_toolchain(
1616
name = "my_funky_toolchain",
17+
bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath"],
1718
)

toolchains/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ filegroup(
6666
#
6767
# Toolchains of this type are only consumed internally by the bootclasspath rule and should not be
6868
# accessed from Starlark.
69-
70-
toolchain_type(name = "bootstrap_runtime_toolchain_type")
69+
# TODO: migrate away from using @bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type ?
70+
# toolchain_type(name = "bootstrap_runtime_toolchain_type")
7171

7272
# Points to toolchain[":runtime_toolchain_type"] (was :legacy_current_java_runtime)
7373
java_runtime_alias(name = "current_java_runtime")

toolchains/default_java_toolchain.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def java_runtime_files(name, srcs):
211211
tags = ["manual"],
212212
)
213213

214-
_JAVA_BOOTSTRAP_RUNTIME_TOOLCHAIN_TYPE = Label("//toolchains:bootstrap_runtime_toolchain_type")
214+
_JAVA_BOOTSTRAP_RUNTIME_TOOLCHAIN_TYPE = Label("@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type")
215215

216216
# Opt the Java bootstrap actions into path mapping:
217217
# https://github.com/bazelbuild/bazel/commit/a239ea84832f18ee8706682145e9595e71b39680

toolchains/local_java_repository.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def local_java_runtime(name, java_home, version, runtime_name = None, visibility
110110
native.toolchain(
111111
name = "bootstrap_runtime_toolchain_definition",
112112
target_settings = [":%s_settings_alias" % name],
113-
toolchain_type = Label("//toolchains:bootstrap_runtime_toolchain_type"),
113+
toolchain_type = Label("@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type"),
114114
toolchain = runtime_name,
115115
)
116116

@@ -268,7 +268,7 @@ toolchain(
268268
toolchain(
269269
name = "bootstrap_runtime_toolchain_definition",
270270
target_settings = [":localjdk_setting"],
271-
toolchain_type = "@rules_java//toolchains:bootstrap_runtime_toolchain_type",
271+
toolchain_type = "@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type",
272272
toolchain = ":jdk",
273273
)
274274
'''

toolchains/remote_java_repository.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ toolchain(
8989
# the same configuration, this constraint will not result in toolchain resolution failures.
9090
exec_compatible_with = {target_compatible_with},
9191
target_settings = [":version_or_prefix_version_setting"],
92-
toolchain_type = "@rules_java//toolchains:bootstrap_runtime_toolchain_type",
92+
toolchain_type = "@bazel_tools//tools/jdk:bootstrap_runtime_toolchain_type",
9393
toolchain = "{toolchain}",
9494
)
9595
""".format(

0 commit comments

Comments
 (0)