Skip to content
Merged
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
8 changes: 4 additions & 4 deletions scala/private/rule_impls.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ def _write_executable(ctx, rjars, main_class, jvm_flags, wrapper, use_jacoco):
)

if use_jacoco and _coverage_replacements_provider.is_enabled(ctx):
classpath = ":".join(
classpath = ctx.configuration.host_path_separator.join(
["${RUNPATH}%s" % (j.short_path) for j in rjars.to_list() + ctx.files._jacocorunner + ctx.files._lcov_merger],
)
jacoco_metadata_file = ctx.actions.declare_file(
Expand All @@ -618,7 +618,7 @@ def _write_executable(ctx, rjars, main_class, jvm_flags, wrapper, use_jacoco):
template = template,
output = ctx.outputs.executable,
substitutions = {
"%classpath%": classpath,
"%classpath%": "\"%s\"" % classpath,
"%javabin%": javabin,
"%jarbin%": _jar_path_based_on_java_bin(ctx),
"%jvm_flags%": jvm_flags,
Expand All @@ -637,14 +637,14 @@ def _write_executable(ctx, rjars, main_class, jvm_flags, wrapper, use_jacoco):
else:
# RUNPATH is defined here:
# https://github.com/bazelbuild/bazel/blob/0.4.5/src/main/java/com/google/devtools/build/lib/bazel/rules/java/java_stub_template.txt#L227
classpath = ":".join(
classpath = ctx.configuration.host_path_separator.join(
["${RUNPATH}%s" % (j.short_path) for j in rjars.to_list()],
)
ctx.actions.expand_template(
template = template,
output = ctx.outputs.executable,
substitutions = {
"%classpath%": classpath,
"%classpath%": "\"%s\"" % classpath,
"%java_start_class%": main_class,
"%javabin%": javabin,
"%jarbin%": _jar_path_based_on_java_bin(ctx),
Expand Down