Skip to content

Commit

Permalink
Simplify _jacoco_offline_instrument. (#790)
Browse files Browse the repository at this point in the history
resolve_command shouldn't be required here.
  • Loading branch information
benjaminp authored and johnynek committed Jul 25, 2019
1 parent 5db90f9 commit c8bde22
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scala/private/rule_impls.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1335,10 +1335,6 @@ def _jacoco_offline_instrument(ctx, input_jar):
if not ctx.configuration.coverage_enabled or not hasattr(ctx.attr, "_code_coverage_instrumentation_worker"):
return _empty_coverage_struct

worker_inputs, _, worker_input_manifests = ctx.resolve_command(
tools = [ctx.attr._code_coverage_instrumentation_worker],
)

output_jar = ctx.actions.declare_file(
"{}-offline.jar".format(input_jar.basename.split(".")[0]),
)
Expand All @@ -1353,10 +1349,9 @@ def _jacoco_offline_instrument(ctx, input_jar):

ctx.actions.run(
mnemonic = "JacocoInstrumenter",
inputs = [in_out_pair[0] for in_out_pair in in_out_pairs] + worker_inputs,
inputs = [in_out_pair[0] for in_out_pair in in_out_pairs],
outputs = [in_out_pair[1] for in_out_pair in in_out_pairs],
executable = ctx.attr._code_coverage_instrumentation_worker.files_to_run.executable,
input_manifests = worker_input_manifests,
executable = ctx.attr._code_coverage_instrumentation_worker.files_to_run,
execution_requirements = {"supports-workers": "1"},
arguments = [args],
)
Expand Down

0 comments on commit c8bde22

Please sign in to comment.