Add incompatible_language_version_bootclasspath
flag
#182
+163
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With
--@rules_java//java:incompatible_language_version_bootclasspath
, the bootclasspath used for Java compilation is now determined based on the numeric version specified in--java_language_version
and the type specified in--java_runtime_version
rather than just using the target runtime.For example, with
--java_language_version=8
and--java_runtime_version=remotejdk_21
, the bootclasspath would be extracted fromremotejdk_8
.For unversioned runtime versions such as
local_jdk
, the behavior doesn't change.If a matching runtime is not available, analysis fails with a customized error message explaining the various options to the user.
Work towards bazelbuild/bazel#21769