Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add incompatible_language_version_bootclasspath flag #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmeum
Copy link
Contributor

@fmeum fmeum commented Apr 2, 2024

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 fmeum requested review from comius and a team as code owners April 2, 2024 08:10
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant