diff --git a/scala/private/phases/phase_coverage.bzl b/scala/private/phases/phase_coverage.bzl index bca6c7f74..6c008d67f 100644 --- a/scala/private/phases/phase_coverage.bzl +++ b/scala/private/phases/phase_coverage.bzl @@ -26,9 +26,7 @@ def _phase_coverage_default(ctx, p, _args = struct()): ) def _phase_coverage(ctx, p, srcjars): - if len(ctx.files.srcs) + len(srcjars.to_list()) == 0 or \ - not ctx.configuration.coverage_enabled or \ - not hasattr(ctx.attr, "_code_coverage_instrumentation_worker"): + if len(ctx.files.srcs) + len(srcjars.to_list()) == 0 or not ctx.configuration.coverage_enabled: return struct( replacements = {}, external_providers = {}, diff --git a/scala/private/rules/scala_library.bzl b/scala/private/rules/scala_library.bzl index 37874948d..a4dd770f2 100644 --- a/scala/private/rules/scala_library.bzl +++ b/scala/private/rules/scala_library.bzl @@ -142,7 +142,6 @@ def _scala_library_for_plugin_bootstrapping_impl(ctx): ("write_manifest", phase_write_manifest), ("collect_jars", phase_collect_jars_library_for_plugin_bootstrapping), ("compile", phase_compile_library_for_plugin_bootstrapping), - ("coverage", phase_coverage_common), ("merge_jars", phase_merge_jars), ("runfiles", phase_runfiles_library), ("collect_exports_jars", phase_collect_exports_jars),