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

Fix Bazel warnings #3414

Merged
merged 2 commits into from
Nov 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions compiler/damlc/jar/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ genrule(
TMP_DIR=damlc-jar-tmp
rm -rf "$$TMP_DIR"
mkdir "$$TMP_DIR"
$(location @tar_dev_env//:tar) xzf $< -C "$$TMP_DIR"
$(location @bazel_tools//tools/jdk:jar) c0Mf $@ -C "$$TMP_DIR" .
$(execpath @tar_dev_env//:tar) xzf $< -C "$$TMP_DIR"
$(JAVABASE)/bin/jar c0Mf $@ -C "$$TMP_DIR" .
""",
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = [
"@bazel_tools//tools/jdk:jar",
"@tar_dev_env//:tar",
],
tools = ["@tar_dev_env//:tar"],
)
2 changes: 1 addition & 1 deletion compiler/damlc/tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ sh_test(
# Generate a simple DALF for plain DALF import testing

genrule(
name = "simple-dalf.dalf",
name = "simple-dalf",
outs = ["simple-dalf.dalf"],
cmd = "$(location :generate-simple-dalf) $@",
tools = [":generate-simple-dalf"],
Expand Down
8 changes: 3 additions & 5 deletions language-support/java/codegen/codegen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ def dar_to_java(**kwargs):
outs = [mangle(src_jar)],
cmd = """
$(execpath //language-support/java/codegen:codegen) -o {gen_out} -d com.daml.ledger.javaapi.TestDecoder {gen_in}
$(execpath @bazel_tools//tools/jdk:jar) -cf $@ -C {gen_out} .
$(JAVABASE)/bin/jar -cf $@ -C {gen_out} .
""".format(
gen_in = "$(location %s)=%s" % (dar, package_prefix),
gen_out = src_out,
),
tools = [
"//language-support/java/codegen:codegen",
"@bazel_tools//tools/jdk:jar",
],
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["//language-support/java/codegen:codegen"],
)

native.java_library(
Expand Down
7 changes: 2 additions & 5 deletions navigator/frontend/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,14 @@ genrule(

# Package result (.JAR)
echo "Packaging result from $$OUT to $(@D)/frontend.jar"
$(location @bazel_tools//tools/jdk:jar) c0Mf "$(@D)/frontend.jar" -C $$OUT .
$(JAVABASE)/bin/jar c0Mf "$(@D)/frontend.jar" -C $$OUT .
""".format(
PATHS_CASE_CHECK = "false" if is_windows else "true",
WP_IN = "$$(cygpath -w $$IN)" if is_windows else "$$IN",
WP_OUT = "$$(cygpath -w $$OUT)" if is_windows else "$$OUT",
),
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = [
":webpack",
"@bazel_tools//tools/jdk:jar",
],
tools = [":webpack"],
visibility = [
"//navigator:__subpackages__",
],
Expand Down