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

Local JDK dependency warnings when building with elemental2 #38

Open
sgammon opened this issue Jun 6, 2019 · 1 comment
Open

Local JDK dependency warnings when building with elemental2 #38

sgammon opened this issue Jun 6, 2019 · 1 comment

Comments

@sgammon
Copy link

sgammon commented Jun 6, 2019

Hello esteemed Googlers,

I get these warnings when building with elemental2, and I was wondering if there is anything I can do to fix it? I would be happy to contribute a PR, but I'm having trouble tracking down where the dependency is. I've looked in elemental2 and jsinterop-generator but with no luck yet.

WARNING: /private/.../external/bazel_tools/tools/jdk/BUILD:116:1: in alias rule @bazel_tools//tools/jdk:jar: target '@bazel_tools//tools/jdk:jar' depends on deprecated target '@local_jdk//:jar': Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)

WARNING: /private/.../external/com_google_jsinterop_generator/third_party/BUILD:62:1: in alias rule @com_google_jsinterop_generator//third_party:jar: target '@com_google_jsinterop_generator//third_party:jar' depends on deprecated target '@local_jdk//:jar': Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)

WARNING: /private/.../external/com_google_elemental2/java/elemental2/core/BUILD:38:1: in _jsinterop_generator rule @com_google_elemental2//java/elemental2/core:core__internal_src_generated: target '@com_google_elemental2//java/elemental2/core:core__internal_src_generated' depends on deprecated target '@local_jdk//:jar': Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)

WARNING: /.../external/com_google_elemental2/java/elemental2/dom/BUILD:95:1: in _jsinterop_generator rule @com_google_elemental2//java/elemental2/dom:dom__internal_src_generated: target '@com_google_elemental2//java/elemental2/dom:dom__internal_src_generated' depends on deprecated target '@local_jdk//:jar': Don't depend on targets in the JDK workspace; use @bazel_tools//tools/jdk:current_java_runtime instead (see https://github.com/bazelbuild/bazel/issues/5594)

I'm not quite sure this is the right place to file this issue, because the warnings mention a number of repositories. Local Bazel version:

Build label: 0.24.1
Build target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Apr 2 16:32:47 2019 (1554222767)
Build timestamp: 1554222767
Build timestamp as int: 1554222767
@jDramaix
Copy link
Member

jDramaix commented Jun 7, 2019

Those warnings are not directly related to elemental2. They come from the jsinterop generator.

The jsinterop generator is referencing @bazel_tools//tools/jdk:jar that depends on deprecated target @local_jdk//:jar

We need to fix that by using @bazel_tools//tools/jdk:current_java_runtime instead referencing directly the jar tool and change the skylark rules using this target. Example: drigz/rules_openapi@5e454dc

@jDramaix jDramaix transferred this issue from google/elemental2 Jun 7, 2019
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

No branches or pull requests

2 participants