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

Simplify _jacoco_offline_instrument. #790

Merged
merged 1 commit into from
Jul 25, 2019
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
9 changes: 2 additions & 7 deletions scala/private/rule_impls.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1333,10 +1333,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 @@ -1351,10 +1347,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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine to me. Do you (@johnynek?) know if we've re-enabled the coverage tests in this repo? They were disabled, but I recall seeing a PR to fix/reenable them for current Bazel versions.

execution_requirements = {"supports-workers": "1"},
arguments = [args],
)
Expand Down