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

Update use of default_java_toolchain in "Java and Bazel" to work correctly #15009

Closed
wants to merge 1 commit into from

Conversation

kjcartledge
Copy link
Contributor

There are really two changes here:

  1. Fix the reference to //tools/jdk:remote_jdk11 to have @bazel_tools. Without this, a direct copy/paste will fail to even build.
  2. Change from JDK9_JVM_OPTS to BASE_JDK9_JVM_OPTS as the former includes --patch-module=java.compiler= which overrides source_version and can also cause build failures. See this issue for an example.

…rly.

There are really two changes here:
  1. Fix the reference to `//tools/jdk:remote_jdk11` to have `@bazel_tools`. Without this, a direct copy/paste will fail to even build.
  2. Change from `JDK9_JVM_OPTS` to `BASE_JDK9_JVM_OPTS` as the former includes `--patch-module=java.compiler=` which overrides `source_version` and can also cause build failures. See bazelbuild#14474 (comment) for an example.
@kjcartledge kjcartledge changed the title Update Java and Bazel's use of default_java_toolchain to work properly Update use of default_java_toolchain in "Java and Bazel" to work correctly Mar 9, 2022
@gregestren gregestren added the team-Rules-Java Issues for Java rules label Mar 9, 2022
@comius
Copy link
Contributor

comius commented Mar 10, 2022

Thanks @kjcartledge!

@bazel-io bazel-io closed this in 76c1048 Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants