rules_java icon indicating copy to clipboard operation
rules_java copied to clipboard

Add `incompatible_language_version_bootclasspath` flag

Open fmeum opened this issue 1 year ago • 0 comments

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 extracted from remotejdk_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. Instead, to make the incompatible change less breaking, the failure could be downgraded to a warning and a fallback to the previous behavior.

Work towards bazelbuild/bazel#21769

fmeum avatar Apr 02 '24 08:04 fmeum