diff --git a/scala/private/phases/phase_collect_jars.bzl b/scala/private/phases/phase_collect_jars.bzl index 43183826d..d61a379ae 100644 --- a/scala/private/phases/phase_collect_jars.bzl +++ b/scala/private/phases/phase_collect_jars.bzl @@ -13,7 +13,7 @@ load( "collect_jars", ) -def phase_scalatest_collect_jars(ctx, p): +def phase_collect_jars_scalatest(ctx, p): args = struct( base_classpath = p.scalac_provider.default_classpath + [ctx.attr._scalatest], extra_runtime_deps = [ @@ -21,21 +21,21 @@ def phase_scalatest_collect_jars(ctx, p): ctx.attr._scalatest_runner, ], ) - return _phase_default_collect_jars(ctx, p, args) + return _phase_collect_jars_default(ctx, p, args) -def phase_repl_collect_jars(ctx, p): +def phase_collect_jars_repl(ctx, p): args = struct( base_classpath = p.scalac_provider.default_repl_classpath, ) - return _phase_default_collect_jars(ctx, p, args) + return _phase_collect_jars_default(ctx, p, args) -def phase_macro_library_collect_jars(ctx, p): +def phase_collect_jars_macro_library(ctx, p): args = struct( base_classpath = p.scalac_provider.default_macro_classpath, ) - return _phase_default_collect_jars(ctx, p, args) + return _phase_collect_jars_default(ctx, p, args) -def phase_junit_test_collect_jars(ctx, p): +def phase_collect_jars_junit_test(ctx, p): args = struct( extra_deps = [ ctx.attr._junit, @@ -44,18 +44,18 @@ def phase_junit_test_collect_jars(ctx, p): ctx.attr._bazel_test_runner, ], ) - return _phase_default_collect_jars(ctx, p, args) + return _phase_collect_jars_default(ctx, p, args) -def phase_library_for_plugin_bootstrapping_collect_jars(ctx, p): +def phase_collect_jars_library_for_plugin_bootstrapping(ctx, p): args = struct( unused_dependency_checker_mode = "off", ) - return _phase_default_collect_jars(ctx, p, args) + return _phase_collect_jars_default(ctx, p, args) -def phase_common_collect_jars(ctx, p): - return _phase_default_collect_jars(ctx, p) +def phase_collect_jars_common(ctx, p): + return _phase_collect_jars_default(ctx, p) -def _phase_default_collect_jars(ctx, p, _args = struct()): +def _phase_collect_jars_default(ctx, p, _args = struct()): return _phase_collect_jars( ctx, _args.base_classpath if hasattr(_args, "base_classpath") else p.scalac_provider.default_classpath, diff --git a/scala/private/phases/phase_compile.bzl b/scala/private/phases/phase_compile.bzl index a3dacc480..8735139a9 100644 --- a/scala/private/phases/phase_compile.bzl +++ b/scala/private/phases/phase_compile.bzl @@ -28,7 +28,7 @@ _empty_coverage_struct = struct( replacements = {}, ) -def phase_binary_compile(ctx, p): +def phase_compile_binary(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ @@ -37,9 +37,9 @@ def phase_binary_compile(ctx, p): ctx.attr.unused_dependency_checker_ignored_targets ], ) - return _phase_default_compile(ctx, p, args) + return _phase_compile_default(ctx, p, args) -def phase_library_compile(ctx, p): +def phase_compile_library(ctx, p): args = struct( srcjars = p.collect_srcjars, unused_dependency_checker_ignored_targets = [ @@ -48,9 +48,9 @@ def phase_library_compile(ctx, p): ctx.attr.unused_dependency_checker_ignored_targets ], ) - return _phase_default_compile(ctx, p, args) + return _phase_compile_default(ctx, p, args) -def phase_library_for_plugin_bootstrapping_compile(ctx, p): +def phase_compile_library_for_plugin_bootstrapping(ctx, p): args = struct( unused_dependency_checker_ignored_targets = [ target.label @@ -58,9 +58,9 @@ def phase_library_for_plugin_bootstrapping_compile(ctx, p): ], unused_dependency_checker_mode = "off", ) - return _phase_default_compile(ctx, p, args) + return _phase_compile_default(ctx, p, args) -def phase_macro_library_compile(ctx, p): +def phase_compile_macro_library(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ @@ -69,9 +69,9 @@ def phase_macro_library_compile(ctx, p): ctx.attr.unused_dependency_checker_ignored_targets ], ) - return _phase_default_compile(ctx, p, args) + return _phase_compile_default(ctx, p, args) -def phase_junit_test_compile(ctx, p): +def phase_compile_junit_test(ctx, p): args = struct( buildijar = False, implicit_junit_deps_needed_for_java_compilation = [ @@ -89,9 +89,9 @@ def phase_junit_test_compile(ctx, p): ctx.attr._bazel_test_runner.label, ], ) - return _phase_default_compile(ctx, p, args) + return _phase_compile_default(ctx, p, args) -def phase_repl_compile(ctx, p): +def phase_compile_repl(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ @@ -100,9 +100,9 @@ def phase_repl_compile(ctx, p): ctx.attr.unused_dependency_checker_ignored_targets ], ) - return _phase_default_compile(ctx, p, args) + return _phase_compile_default(ctx, p, args) -def phase_scalatest_compile(ctx, p): +def phase_compile_scalatest(ctx, p): args = struct( buildijar = False, unused_dependency_checker_ignored_targets = [ @@ -111,12 +111,12 @@ def phase_scalatest_compile(ctx, p): ctx.attr.unused_dependency_checker_ignored_targets ], ) - return _phase_default_compile(ctx, p, args) + return _phase_compile_default(ctx, p, args) -def phase_common_compile(ctx, p): - return _phase_default_compile(ctx, p) +def phase_compile_common(ctx, p): + return _phase_compile_default(ctx, p) -def _phase_default_compile(ctx, p, _args = struct()): +def _phase_compile_default(ctx, p, _args = struct()): return _phase_compile( ctx, p, diff --git a/scala/private/phases/phase_default_info.bzl b/scala/private/phases/phase_default_info.bzl index 4f5731515..e0f0b484e 100644 --- a/scala/private/phases/phase_default_info.bzl +++ b/scala/private/phases/phase_default_info.bzl @@ -3,7 +3,7 @@ # # DOCUMENT THIS # -def phase_binary_default_info(ctx, p): +def phase_default_info_binary(ctx, p): return struct( external_providers = [ DefaultInfo( @@ -14,7 +14,7 @@ def phase_binary_default_info(ctx, p): ], ) -def phase_library_default_info(ctx, p): +def phase_default_info_library(ctx, p): return struct( external_providers = [ DefaultInfo( @@ -24,7 +24,7 @@ def phase_library_default_info(ctx, p): ], ) -def phase_scalatest_default_info(ctx, p): +def phase_default_info_scalatest(ctx, p): return struct( external_providers = [ DefaultInfo( diff --git a/scala/private/phases/phase_java_wrapper.bzl b/scala/private/phases/phase_java_wrapper.bzl index 1db2cfc8b..a3fab5d76 100644 --- a/scala/private/phases/phase_java_wrapper.bzl +++ b/scala/private/phases/phase_java_wrapper.bzl @@ -8,7 +8,7 @@ load( _java_bin = "java_bin", ) -def phase_repl_java_wrapper(ctx, p): +def phase_java_wrapper_repl(ctx, p): args = struct( args = " ".join(ctx.attr.scalacopts), wrapper_preamble = """ @@ -26,12 +26,12 @@ function finish() { trap finish EXIT """, ) - return _phase_default_java_wrapper(ctx, p, args) + return _phase_java_wrapper_default(ctx, p, args) -def phase_common_java_wrapper(ctx, p): - return _phase_default_java_wrapper(ctx, p) +def phase_java_wrapper_common(ctx, p): + return _phase_java_wrapper_default(ctx, p) -def _phase_default_java_wrapper(ctx, p, _args = struct()): +def _phase_java_wrapper_default(ctx, p, _args = struct()): return _phase_java_wrapper( ctx, _args.args if hasattr(_args, "args") else "", diff --git a/scala/private/phases/phase_runfiles.bzl b/scala/private/phases/phase_runfiles.bzl index db5e6e8a2..c2b164222 100644 --- a/scala/private/phases/phase_runfiles.bzl +++ b/scala/private/phases/phase_runfiles.bzl @@ -3,14 +3,14 @@ # # DOCUMENT THIS # -def phase_library_runfiles(ctx, p): +def phase_runfiles_library(ctx, p): args = struct( # Using transitive_files since transitive_rjars a depset and avoiding linearization transitive_files = p.compile.rjars, ) - return _phase_default_runfiles(ctx, p, args) + return _phase_runfiles_default(ctx, p, args) -def phase_scalatest_runfiles(ctx, p): +def phase_runfiles_scalatest(ctx, p): args = "\n".join([ "-R", ctx.outputs.jar.short_path, @@ -29,12 +29,12 @@ def phase_scalatest_runfiles(ctx, p): ), args_file = args_file, ) - return _phase_default_runfiles(ctx, p, args) + return _phase_runfiles_default(ctx, p, args) -def phase_common_runfiles(ctx, p): - return _phase_default_runfiles(ctx, p) +def phase_runfiles_common(ctx, p): + return _phase_runfiles_default(ctx, p) -def _phase_default_runfiles(ctx, p, _args = struct()): +def _phase_runfiles_default(ctx, p, _args = struct()): return _phase_runfiles( ctx, _args.transitive_files if hasattr(_args, "transitive_files") else depset( diff --git a/scala/private/phases/phase_write_executable.bzl b/scala/private/phases/phase_write_executable.bzl index 92931196b..bae55fa99 100644 --- a/scala/private/phases/phase_write_executable.bzl +++ b/scala/private/phases/phase_write_executable.bzl @@ -16,7 +16,7 @@ load( _coverage_replacements_provider = "coverage_replacements_provider", ) -def phase_scalatest_write_executable(ctx, p): +def phase_write_executable_scalatest(ctx, p): # jvm_flags passed in on the target override scala_test_jvm_flags passed in on the # toolchain final_jvm_flags = first_non_empty( @@ -31,26 +31,26 @@ def phase_scalatest_write_executable(ctx, p): ] + expand_location(ctx, final_jvm_flags), use_jacoco = ctx.configuration.coverage_enabled, ) - return _phase_deafult_write_executable(ctx, p, args) + return _phase_write_executable_default(ctx, p, args) -def phase_repl_write_executable(ctx, p): +def phase_write_executable_repl(ctx, p): args = struct( jvm_flags = ["-Dscala.usejavacp=true"] + ctx.attr.jvm_flags, main_class = "scala.tools.nsc.MainGenericRunner", ) - return _phase_deafult_write_executable(ctx, p, args) + return _phase_write_executable_default(ctx, p, args) -def phase_junit_test_write_executable(ctx, p): +def phase_write_executable_junit_test(ctx, p): args = struct( jvm_flags = p.jvm_flags + ctx.attr.jvm_flags, main_class = "com.google.testing.junit.runner.BazelTestRunner", ) - return _phase_deafult_write_executable(ctx, p, args) + return _phase_write_executable_default(ctx, p, args) -def phase_common_write_executable(ctx, p): - return _phase_deafult_write_executable(ctx, p) +def phase_write_executable_common(ctx, p): + return _phase_write_executable_default(ctx, p) -def _phase_deafult_write_executable(ctx, p, _args = struct()): +def _phase_write_executable_default(ctx, p, _args = struct()): return _phase_write_executable( ctx, p, diff --git a/scala/private/phases/phases.bzl b/scala/private/phases/phases.bzl index 6a9b4141f..2cba42bde 100644 --- a/scala/private/phases/phases.bzl +++ b/scala/private/phases/phases.bzl @@ -9,47 +9,47 @@ load( ) load( "@io_bazel_rules_scala//scala/private:phases/phase_write_executable.bzl", - _phase_common_write_executable = "phase_common_write_executable", - _phase_junit_test_write_executable = "phase_junit_test_write_executable", - _phase_repl_write_executable = "phase_repl_write_executable", - _phase_scalatest_write_executable = "phase_scalatest_write_executable", + _phase_write_executable_common = "phase_write_executable_common", + _phase_write_executable_junit_test = "phase_write_executable_junit_test", + _phase_write_executable_repl = "phase_write_executable_repl", + _phase_write_executable_scalatest = "phase_write_executable_scalatest", ) load( "@io_bazel_rules_scala//scala/private:phases/phase_java_wrapper.bzl", - _phase_common_java_wrapper = "phase_common_java_wrapper", - _phase_repl_java_wrapper = "phase_repl_java_wrapper", + _phase_java_wrapper_common = "phase_java_wrapper_common", + _phase_java_wrapper_repl = "phase_java_wrapper_repl", ) load( "@io_bazel_rules_scala//scala/private:phases/phase_collect_jars.bzl", - _phase_common_collect_jars = "phase_common_collect_jars", - _phase_junit_test_collect_jars = "phase_junit_test_collect_jars", - _phase_library_for_plugin_bootstrapping_collect_jars = "phase_library_for_plugin_bootstrapping_collect_jars", - _phase_macro_library_collect_jars = "phase_macro_library_collect_jars", - _phase_repl_collect_jars = "phase_repl_collect_jars", - _phase_scalatest_collect_jars = "phase_scalatest_collect_jars", + _phase_collect_jars_common = "phase_collect_jars_common", + _phase_collect_jars_junit_test = "phase_collect_jars_junit_test", + _phase_collect_jars_library_for_plugin_bootstrapping = "phase_collect_jars_library_for_plugin_bootstrapping", + _phase_collect_jars_macro_library = "phase_collect_jars_macro_library", + _phase_collect_jars_repl = "phase_collect_jars_repl", + _phase_collect_jars_scalatest = "phase_collect_jars_scalatest", ) load( "@io_bazel_rules_scala//scala/private:phases/phase_compile.bzl", - _phase_binary_compile = "phase_binary_compile", - _phase_common_compile = "phase_common_compile", - _phase_junit_test_compile = "phase_junit_test_compile", - _phase_library_compile = "phase_library_compile", - _phase_library_for_plugin_bootstrapping_compile = "phase_library_for_plugin_bootstrapping_compile", - _phase_macro_library_compile = "phase_macro_library_compile", - _phase_repl_compile = "phase_repl_compile", - _phase_scalatest_compile = "phase_scalatest_compile", + _phase_compile_binary = "phase_compile_binary", + _phase_compile_common = "phase_compile_common", + _phase_compile_junit_test = "phase_compile_junit_test", + _phase_compile_library = "phase_compile_library", + _phase_compile_library_for_plugin_bootstrapping = "phase_compile_library_for_plugin_bootstrapping", + _phase_compile_macro_library = "phase_compile_macro_library", + _phase_compile_repl = "phase_compile_repl", + _phase_compile_scalatest = "phase_compile_scalatest", ) load( "@io_bazel_rules_scala//scala/private:phases/phase_runfiles.bzl", - _phase_common_runfiles = "phase_common_runfiles", - _phase_library_runfiles = "phase_library_runfiles", - _phase_scalatest_runfiles = "phase_scalatest_runfiles", + _phase_runfiles_common = "phase_runfiles_common", + _phase_runfiles_library = "phase_runfiles_library", + _phase_runfiles_scalatest = "phase_runfiles_scalatest", ) load( "@io_bazel_rules_scala//scala/private:phases/phase_default_info.bzl", - _phase_binary_default_info = "phase_binary_default_info", - _phase_library_default_info = "phase_library_default_info", - _phase_scalatest_default_info = "phase_scalatest_default_info", + _phase_default_info_binary = "phase_default_info_binary", + _phase_default_info_library = "phase_default_info_library", + _phase_default_info_scalatest = "phase_default_info_scalatest", ) load("@io_bazel_rules_scala//scala/private:phases/phase_scalac_provider.bzl", _phase_scalac_provider = "phase_scalac_provider") load("@io_bazel_rules_scala//scala/private:phases/phase_write_manifest.bzl", _phase_write_manifest = "phase_write_manifest") @@ -93,39 +93,39 @@ phase_jvm_flags = _phase_jvm_flags phase_coverage_runfiles = _phase_coverage_runfiles # write_executable -phase_scalatest_write_executable = _phase_scalatest_write_executable -phase_repl_write_executable = _phase_repl_write_executable -phase_junit_test_write_executable = _phase_junit_test_write_executable -phase_common_write_executable = _phase_common_write_executable +phase_write_executable_scalatest = _phase_write_executable_scalatest +phase_write_executable_repl = _phase_write_executable_repl +phase_write_executable_junit_test = _phase_write_executable_junit_test +phase_write_executable_common = _phase_write_executable_common # java_wrapper -phase_repl_java_wrapper = _phase_repl_java_wrapper -phase_common_java_wrapper = _phase_common_java_wrapper +phase_java_wrapper_repl = _phase_java_wrapper_repl +phase_java_wrapper_common = _phase_java_wrapper_common # collect_jars -phase_scalatest_collect_jars = _phase_scalatest_collect_jars -phase_repl_collect_jars = _phase_repl_collect_jars -phase_macro_library_collect_jars = _phase_macro_library_collect_jars -phase_junit_test_collect_jars = _phase_junit_test_collect_jars -phase_library_for_plugin_bootstrapping_collect_jars = _phase_library_for_plugin_bootstrapping_collect_jars -phase_common_collect_jars = _phase_common_collect_jars +phase_collect_jars_scalatest = _phase_collect_jars_scalatest +phase_collect_jars_repl = _phase_collect_jars_repl +phase_collect_jars_macro_library = _phase_collect_jars_macro_library +phase_collect_jars_junit_test = _phase_collect_jars_junit_test +phase_collect_jars_library_for_plugin_bootstrapping = _phase_collect_jars_library_for_plugin_bootstrapping +phase_collect_jars_common = _phase_collect_jars_common # compile -phase_binary_compile = _phase_binary_compile -phase_library_compile = _phase_library_compile -phase_library_for_plugin_bootstrapping_compile = _phase_library_for_plugin_bootstrapping_compile -phase_macro_library_compile = _phase_macro_library_compile -phase_junit_test_compile = _phase_junit_test_compile -phase_repl_compile = _phase_repl_compile -phase_scalatest_compile = _phase_scalatest_compile -phase_common_compile = _phase_common_compile +phase_compile_binary = _phase_compile_binary +phase_compile_library = _phase_compile_library +phase_compile_library_for_plugin_bootstrapping = _phase_compile_library_for_plugin_bootstrapping +phase_compile_macro_library = _phase_compile_macro_library +phase_compile_junit_test = _phase_compile_junit_test +phase_compile_repl = _phase_compile_repl +phase_compile_scalatest = _phase_compile_scalatest +phase_compile_common = _phase_compile_common # runfiles -phase_library_runfiles = _phase_library_runfiles -phase_scalatest_runfiles = _phase_scalatest_runfiles -phase_common_runfiles = _phase_common_runfiles +phase_runfiles_library = _phase_runfiles_library +phase_runfiles_scalatest = _phase_runfiles_scalatest +phase_runfiles_common = _phase_runfiles_common # default_info -phase_binary_default_info = _phase_binary_default_info -phase_library_default_info = _phase_library_default_info -phase_scalatest_default_info = _phase_scalatest_default_info +phase_default_info_binary = _phase_default_info_binary +phase_default_info_library = _phase_default_info_library +phase_default_info_scalatest = _phase_default_info_scalatest diff --git a/scala/private/rules/scala_binary.bzl b/scala/private/rules/scala_binary.bzl index dc9cc801c..ec380a1ba 100644 --- a/scala/private/rules/scala_binary.bzl +++ b/scala/private/rules/scala_binary.bzl @@ -12,16 +12,16 @@ load("@io_bazel_rules_scala//scala/private:common_outputs.bzl", "common_outputs" load( "@io_bazel_rules_scala//scala/private:phases/phases.bzl", "extras_phases", - "phase_binary_compile", - "phase_binary_default_info", - "phase_common_collect_jars", - "phase_common_java_wrapper", - "phase_common_runfiles", - "phase_common_write_executable", + "phase_collect_jars_common", + "phase_compile_binary", "phase_declare_executable", + "phase_default_info_binary", + "phase_java_wrapper_common", "phase_merge_jars", + "phase_runfiles_common", "phase_scalac_provider", "phase_unused_deps_checker", + "phase_write_executable_common", "phase_write_manifest", "run_phases", ) @@ -34,15 +34,15 @@ def _scala_binary_impl(ctx): ("scalac_provider", phase_scalac_provider), ("write_manifest", phase_write_manifest), ("unused_deps_checker", phase_unused_deps_checker), - ("collect_jars", phase_common_collect_jars), - ("java_wrapper", phase_common_java_wrapper), + ("collect_jars", phase_collect_jars_common), + ("java_wrapper", phase_java_wrapper_common), ("declare_executable", phase_declare_executable), # no need to build an ijar for an executable - ("compile", phase_binary_compile), + ("compile", phase_compile_binary), ("merge_jars", phase_merge_jars), - ("runfiles", phase_common_runfiles), - ("write_executable", phase_common_write_executable), - ("default_info", phase_binary_default_info), + ("runfiles", phase_runfiles_common), + ("write_executable", phase_write_executable_common), + ("default_info", phase_default_info_binary), ], ) diff --git a/scala/private/rules/scala_junit_test.bzl b/scala/private/rules/scala_junit_test.bzl index bf8ad4482..b98f8d9c3 100644 --- a/scala/private/rules/scala_junit_test.bzl +++ b/scala/private/rules/scala_junit_test.bzl @@ -11,17 +11,17 @@ load("@io_bazel_rules_scala//scala/private:common_outputs.bzl", "common_outputs" load( "@io_bazel_rules_scala//scala/private:phases/phases.bzl", "extras_phases", - "phase_binary_default_info", - "phase_common_java_wrapper", - "phase_common_runfiles", + "phase_collect_jars_junit_test", + "phase_compile_junit_test", "phase_declare_executable", - "phase_junit_test_collect_jars", - "phase_junit_test_compile", - "phase_junit_test_write_executable", + "phase_default_info_binary", + "phase_java_wrapper_common", "phase_jvm_flags", "phase_merge_jars", + "phase_runfiles_common", "phase_scalac_provider", "phase_unused_deps_checker", + "phase_write_executable_junit_test", "phase_write_manifest", "run_phases", ) @@ -38,16 +38,16 @@ def _scala_junit_test_impl(ctx): ("scalac_provider", phase_scalac_provider), ("write_manifest", phase_write_manifest), ("unused_deps_checker", phase_unused_deps_checker), - ("collect_jars", phase_junit_test_collect_jars), - ("java_wrapper", phase_common_java_wrapper), + ("collect_jars", phase_collect_jars_junit_test), + ("java_wrapper", phase_java_wrapper_common), ("declare_executable", phase_declare_executable), # no need to build an ijar for an executable - ("compile", phase_junit_test_compile), + ("compile", phase_compile_junit_test), ("merge_jars", phase_merge_jars), - ("runfiles", phase_common_runfiles), + ("runfiles", phase_runfiles_common), ("jvm_flags", phase_jvm_flags), - ("write_executable", phase_junit_test_write_executable), - ("default_info", phase_binary_default_info), + ("write_executable", phase_write_executable_junit_test), + ("default_info", phase_default_info_binary), ], ) diff --git a/scala/private/rules/scala_library.bzl b/scala/private/rules/scala_library.bzl index e547c4801..2098851f7 100644 --- a/scala/private/rules/scala_library.bzl +++ b/scala/private/rules/scala_library.bzl @@ -19,16 +19,16 @@ load( "@io_bazel_rules_scala//scala/private:phases/phases.bzl", "extras_phases", "phase_collect_exports_jars", + "phase_collect_jars_common", + "phase_collect_jars_library_for_plugin_bootstrapping", + "phase_collect_jars_macro_library", "phase_collect_srcjars", - "phase_common_collect_jars", - "phase_library_compile", - "phase_library_default_info", - "phase_library_for_plugin_bootstrapping_collect_jars", - "phase_library_for_plugin_bootstrapping_compile", - "phase_library_runfiles", - "phase_macro_library_collect_jars", - "phase_macro_library_compile", + "phase_compile_library", + "phase_compile_library_for_plugin_bootstrapping", + "phase_compile_macro_library", + "phase_default_info_library", "phase_merge_jars", + "phase_runfiles_library", "phase_scalac_provider", "phase_unused_deps_checker", "phase_write_manifest", @@ -61,12 +61,12 @@ def _scala_library_impl(ctx): ("collect_srcjars", phase_collect_srcjars), ("write_manifest", phase_write_manifest), ("unused_deps_checker", phase_unused_deps_checker), - ("collect_jars", phase_common_collect_jars), - ("compile", phase_library_compile), + ("collect_jars", phase_collect_jars_common), + ("compile", phase_compile_library), ("merge_jars", phase_merge_jars), - ("runfiles", phase_library_runfiles), + ("runfiles", phase_runfiles_library), ("collect_exports_jars", phase_collect_exports_jars), - ("default_info", phase_library_default_info), + ("default_info", phase_default_info_library), ], ) @@ -137,12 +137,12 @@ def _scala_library_for_plugin_bootstrapping_impl(ctx): ("scalac_provider", phase_scalac_provider), ("collect_srcjars", phase_collect_srcjars), ("write_manifest", phase_write_manifest), - ("collect_jars", phase_library_for_plugin_bootstrapping_collect_jars), - ("compile", phase_library_for_plugin_bootstrapping_compile), + ("collect_jars", phase_collect_jars_library_for_plugin_bootstrapping), + ("compile", phase_compile_library_for_plugin_bootstrapping), ("merge_jars", phase_merge_jars), - ("runfiles", phase_library_runfiles), + ("runfiles", phase_runfiles_library), ("collect_exports_jars", phase_collect_exports_jars), - ("default_info", phase_library_default_info), + ("default_info", phase_default_info_library), ], ) @@ -192,12 +192,12 @@ def _scala_macro_library_impl(ctx): ("collect_srcjars", phase_collect_srcjars), ("write_manifest", phase_write_manifest), ("unused_deps_checker", phase_unused_deps_checker), - ("collect_jars", phase_macro_library_collect_jars), - ("compile", phase_macro_library_compile), + ("collect_jars", phase_collect_jars_macro_library), + ("compile", phase_compile_macro_library), ("merge_jars", phase_merge_jars), - ("runfiles", phase_library_runfiles), + ("runfiles", phase_runfiles_library), ("collect_exports_jars", phase_collect_exports_jars), - ("default_info", phase_library_default_info), + ("default_info", phase_default_info_library), ], ) diff --git a/scala/private/rules/scala_repl.bzl b/scala/private/rules/scala_repl.bzl index be753d67b..1550b0c9d 100644 --- a/scala/private/rules/scala_repl.bzl +++ b/scala/private/rules/scala_repl.bzl @@ -12,16 +12,16 @@ load("@io_bazel_rules_scala//scala/private:common_outputs.bzl", "common_outputs" load( "@io_bazel_rules_scala//scala/private:phases/phases.bzl", "extras_phases", - "phase_binary_default_info", - "phase_common_runfiles", + "phase_collect_jars_repl", + "phase_compile_repl", "phase_declare_executable", + "phase_default_info_binary", + "phase_java_wrapper_repl", "phase_merge_jars", - "phase_repl_collect_jars", - "phase_repl_compile", - "phase_repl_java_wrapper", - "phase_repl_write_executable", + "phase_runfiles_common", "phase_scalac_provider", "phase_unused_deps_checker", + "phase_write_executable_repl", "phase_write_manifest", "run_phases", ) @@ -35,15 +35,15 @@ def _scala_repl_impl(ctx): ("write_manifest", phase_write_manifest), ("unused_deps_checker", phase_unused_deps_checker), # need scala-compiler for MainGenericRunner below - ("collect_jars", phase_repl_collect_jars), - ("java_wrapper", phase_repl_java_wrapper), + ("collect_jars", phase_collect_jars_repl), + ("java_wrapper", phase_java_wrapper_repl), ("declare_executable", phase_declare_executable), # no need to build an ijar for an executable - ("compile", phase_repl_compile), + ("compile", phase_compile_repl), ("merge_jars", phase_merge_jars), - ("runfiles", phase_common_runfiles), - ("write_executable", phase_repl_write_executable), - ("default_info", phase_binary_default_info), + ("runfiles", phase_runfiles_common), + ("write_executable", phase_write_executable_repl), + ("default_info", phase_default_info_binary), ], ) diff --git a/scala/private/rules/scala_test.bzl b/scala/private/rules/scala_test.bzl index afc2b19dc..d9d42ead9 100644 --- a/scala/private/rules/scala_test.bzl +++ b/scala/private/rules/scala_test.bzl @@ -12,17 +12,17 @@ load("@io_bazel_rules_scala//scala/private:common_outputs.bzl", "common_outputs" load( "@io_bazel_rules_scala//scala/private:phases/phases.bzl", "extras_phases", - "phase_common_java_wrapper", + "phase_collect_jars_scalatest", + "phase_compile_scalatest", "phase_coverage_runfiles", "phase_declare_executable", + "phase_default_info_scalatest", + "phase_java_wrapper_common", "phase_merge_jars", + "phase_runfiles_scalatest", "phase_scalac_provider", - "phase_scalatest_collect_jars", - "phase_scalatest_compile", - "phase_scalatest_default_info", - "phase_scalatest_runfiles", - "phase_scalatest_write_executable", "phase_unused_deps_checker", + "phase_write_executable_scalatest", "phase_write_manifest", "run_phases", ) @@ -35,16 +35,16 @@ def _scala_test_impl(ctx): ("scalac_provider", phase_scalac_provider), ("write_manifest", phase_write_manifest), ("unused_deps_checker", phase_unused_deps_checker), - ("collect_jars", phase_scalatest_collect_jars), - ("java_wrapper", phase_common_java_wrapper), + ("collect_jars", phase_collect_jars_scalatest), + ("java_wrapper", phase_java_wrapper_common), ("declare_executable", phase_declare_executable), # no need to build an ijar for an executable - ("compile", phase_scalatest_compile), + ("compile", phase_compile_scalatest), ("merge_jars", phase_merge_jars), - ("runfiles", phase_scalatest_runfiles), + ("runfiles", phase_runfiles_scalatest), ("coverage_runfiles", phase_coverage_runfiles), - ("write_executable", phase_scalatest_write_executable), - ("default_info", phase_scalatest_default_info), + ("write_executable", phase_write_executable_scalatest), + ("default_info", phase_default_info_scalatest), ], )