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

incompatible_use_remote_java_toolchain: use remote Java tools instead of the embedded deploy jars #7196

Closed
iirina opened this issue Jan 21, 2019 · 3 comments
Assignees
Labels
incompatible-change Incompatible/breaking change

Comments

@iirina
Copy link
Contributor

iirina commented Jan 21, 2019

The option --incompatible_use_remote_java_toolchain will download the remote Java tools (archive of deploy jars) for the target configuration instead of using the corresponding embedded deploy jars. Enabling this flag only affects users of the Java rules.

Migration Notes

There are no actions required from the users. No migration is needed.

@iirina iirina added the incompatible-change Incompatible/breaking change label Jan 21, 2019
@iirina iirina self-assigned this Jan 21, 2019
bazel-io pushed a commit that referenced this issue Jan 21, 2019
…t java_toolchain and host_java_toolchain.

This PR introduces the flags:
* `--incompatible_use_remote_host_java_toolchain`
*  `--incompatible_use_remote_java_toolchain`

Progress on #6316 #7196 #7197

Closes #7156.

PiperOrigin-RevId: 230209934
weixiao-huang pushed a commit to weixiao-huang/bazel that referenced this issue Jan 31, 2019
…t java_toolchain and host_java_toolchain.

This PR introduces the flags:
* `--incompatible_use_remote_host_java_toolchain`
*  `--incompatible_use_remote_java_toolchain`

Progress on bazelbuild#6316 bazelbuild#7196 bazelbuild#7197

Closes bazelbuild#7156.

PiperOrigin-RevId: 230209934
@scottmin0r
Copy link

For this flag and the one in #7197 - what if users don't want to download this archive, or want to change the location/manner in which this archive is obtained? This would be important for CI systems with no internet connectivity, and orgs that want to audit/control build-time dependencies (both in terms of artifacts and systems). Will there be a flag moving forward that will disable this download?

@iirina
Copy link
Contributor Author

iirina commented Mar 6, 2019

@scottmin0r To not download the archive you have to set the flags --java_toolchain and --host_java_toolchain to point to local tools.

@scottmin0r
Copy link

scottmin0r commented Apr 25, 2019

Specifically what should I pass for those flag values? As per this comment I've tried:

(release 0.24.1)

build --javabase=@local_jdk//:jdk
build --host_javabase=@local_jdk//:jdk
build --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
build --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8

but this still seems to try to download tools (with two different failure modes):

Analyzing: 1166 targets (68 packages loaded, 2267 targets configured)
Analyzing: 1166 targets (68 packages loaded, 2267 targets configured)
Analyzing: 1166 targets (68 packages loaded, 2267 targets configured)
Analyzing: 1166 targets (68 packages loaded, 2267 targets configured)
Analyzing: 1166 targets (68 packages loaded, 2267 targets configured)
ERROR: /home/kbuilder/.cache/bazel/_bazel_kbuilder/94efa1614cde89691caae16b65396550/external/bazel_tools/tools/jdk/BUILD:218:1: no such package '@remote_java_tools//': java.io.IOException: Error downloading [https://mirror.bazel.build/bazel_java_tools/java_tools_pkg-0.5.1.tar.gz] to /home/kbuilder/.cache/bazel/_bazel_kbuilder/94efa1614cde89691caae16b65396550/external/remote_java_tools/java_tools_pkg-0.5.1.tar.gz: Network is unreachable (connect failed) and referenced by '@bazel_tools//tools/jdk:JacocoCoverageRunner'
Analyzing: 56 targets (8 packages loaded, 587 targets configured)
Analyzing: 56 targets (8 packages loaded, 587 targets configured)
Analyzing: 56 targets (8 packages loaded, 587 targets configured)
Analyzing: 56 targets (8 packages loaded, 587 targets configured)
Analyzing: 56 targets (8 packages loaded, 587 targets configured)
Analyzing: 56 targets (8 packages loaded, 587 targets configured)
ERROR: /home/kbuilder/.cache/bazel/_bazel_kbuilder/1858cc0ae663ea49d21c8c6b3132f559/external/bazel_tools/tools/jdk/BUILD:153:1: no such package '@remote_java_tools//': java.io.IOException: thread interrupted and referenced by '@bazel_tools//tools/jdk:genclass'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incompatible-change Incompatible/breaking change
Projects
None yet
Development

No branches or pull requests

4 participants
@iirina @lberki @scottmin0r and others