Skip to content

Commit e8dc770

Browse files
ittaizAndre Rocha
authored andcommitted
Remove phase scala provider (bazel-contrib#913)
* phase_jvm_flags uses JavaInfo provider instead of scala_provider * remove phase scala_provider * readme clarifies minimum version at HEAD is 1.1.0 * travis.yml moved from 0.28.1 to 1.1.0
1 parent 3eac539 commit e8dc770

File tree

14 files changed

+12
-120
lines changed

14 files changed

+12
-120
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,19 @@ jobs:
4949
env: TEST_SCRIPT=test_lint
5050
# Test
5151
- <<: *linux
52-
env: TEST_SCRIPT=test_rules_scala BAZEL_VERSION=0.28.1
52+
env: TEST_SCRIPT=test_rules_scala BAZEL_VERSION=1.1.0
5353
- <<: *linux
5454
env: TEST_SCRIPT=test_rules_scala BAZEL_VERSION=2.0.0
5555
- <<: *linux
56-
env: TEST_SCRIPT=test_reproducibility BAZEL_VERSION=0.28.1
56+
env: TEST_SCRIPT=test_reproducibility BAZEL_VERSION=1.1.0
5757
- <<: *linux
5858
env: TEST_SCRIPT=test_reproducibility BAZEL_VERSION=2.0.0
5959
- <<: *osx
60-
env: TEST_SCRIPT=test_rules_scala BAZEL_VERSION=0.28.1
60+
env: TEST_SCRIPT=test_rules_scala BAZEL_VERSION=1.1.0
6161
- <<: *osx
6262
env: TEST_SCRIPT=test_rules_scala BAZEL_VERSION=2.0.0
6363
- <<: *osx
64-
env: TEST_SCRIPT=test_reproducibility BAZEL_VERSION=0.28.1
64+
env: TEST_SCRIPT=test_reproducibility BAZEL_VERSION=1.1.0
6565
- <<: *osx
6666
env: TEST_SCRIPT=test_reproducibility BAZEL_VERSION=2.0.0
6767

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ for an example workspace using another scala version.
111111
| bazel | rules_scala gitsha |
112112
|--------|--------------------|
113113
| 2.0.0 | HEAD |
114-
| 0.28.1 | HEAD |
115-
| 0.23.x | ca655e5a330cbf1d66ce1d9baa63522752ec6011 | |
114+
| 1.1.0 | HEAD |
115+
| 0.28.1 | bd0c388125e12f4f173648fc4474f73160a5c628 |
116+
| 0.23.x | ca655e5a330cbf1d66ce1d9baa63522752ec6011 |
116117
| 0.22.x | f3113fb6e9e35cb8f441d2305542026d98afc0a2 |
117118
| 0.16.x | f3113fb6e9e35cb8f441d2305542026d98afc0a2 |
118119
| 0.15.x | 3b9ab9be31ac217d3337c709cb6bfeb89c8dcbb1 |

scala/private/phases/phase_final.bzl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ def phase_binary_final(ctx, p):
1111
instrumented_files = p.compile.coverage.instrumented_files,
1212
providers = [p.compile.merged_provider, p.collect_jars.jars2labels] + p.compile.coverage.providers,
1313
runfiles = p.runfiles.runfiles,
14-
scala = p.scala_provider,
1514
transitive_rjars = p.compile.rjars, #calling rules need this for the classpath in the launcher
1615
)
1716

@@ -22,7 +21,6 @@ def phase_library_final(ctx, p):
2221
jars_to_labels = p.collect_jars.jars2labels,
2322
providers = [p.compile.merged_provider, p.collect_jars.jars2labels] + p.compile.coverage.providers,
2423
runfiles = p.runfiles.runfiles,
25-
scala = p.scala_provider,
2624
)
2725

2826
def phase_scalatest_final(ctx, p):
@@ -34,5 +32,4 @@ def phase_scalatest_final(ctx, p):
3432
instrumented_files = p.compile.coverage.instrumented_files,
3533
providers = [p.compile.merged_provider, p.collect_jars.jars2labels] + p.compile.coverage.providers,
3634
runfiles = ctx.runfiles(coverage_runfiles, transitive_files = p.runfiles.runfiles.files),
37-
scala = p.scala_provider,
3835
)

scala/private/phases/phase_jvm_flags.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def phase_jvm_flags(ctx, p):
77
if ctx.attr.tests_from:
88
archives = _get_test_archive_jars(ctx, ctx.attr.tests_from)
99
else:
10-
archives = [archive.class_jar for archive in p.scala_provider.outputs.jars]
10+
archives = p.compile.merged_provider.runtime_output_jars
1111

1212
serialized_archives = _serialize_archives_short_path(archives)
1313
test_suite = _gen_test_suite_flags_based_on_prefixes_and_suffixes(

scala/private/phases/phase_scala_provider.bzl

Lines changed: 0 additions & 51 deletions
This file was deleted.

scala/private/phases/phases.bzl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ load(
3939
_phase_repl_compile = "phase_repl_compile",
4040
_phase_scalatest_compile = "phase_scalatest_compile",
4141
)
42-
load(
43-
"@io_bazel_rules_scala//scala/private:phases/phase_scala_provider.bzl",
44-
_phase_common_scala_provider = "phase_common_scala_provider",
45-
_phase_library_scala_provider = "phase_library_scala_provider",
46-
)
4742
load(
4843
"@io_bazel_rules_scala//scala/private:phases/phase_runfiles.bzl",
4944
_phase_common_runfiles = "phase_common_runfiles",
@@ -125,10 +120,6 @@ phase_repl_compile = _phase_repl_compile
125120
phase_scalatest_compile = _phase_scalatest_compile
126121
phase_common_compile = _phase_common_compile
127122

128-
# scala_provider
129-
phase_library_scala_provider = _phase_library_scala_provider
130-
phase_common_scala_provider = _phase_common_scala_provider
131-
132123
# runfiles
133124
phase_library_runfiles = _phase_library_runfiles
134125
phase_scalatest_runfiles = _phase_scalatest_runfiles

scala/private/rule_impls.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
load(
1717
"@io_bazel_rules_scala//scala:providers.bzl",
18-
"create_scala_provider",
1918
_ScalacProvider = "ScalacProvider",
2019
)
2120
load(

scala/private/rules/scala_binary.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ load(
1717
"phase_common_collect_jars",
1818
"phase_common_java_wrapper",
1919
"phase_common_runfiles",
20-
"phase_common_scala_provider",
2120
"phase_common_write_executable",
2221
"phase_declare_executable",
2322
"phase_merge_jars",
@@ -42,7 +41,6 @@ def _scala_binary_impl(ctx):
4241
("compile", phase_binary_compile),
4342
("merge_jars", phase_merge_jars),
4443
("runfiles", phase_common_runfiles),
45-
("scala_provider", phase_common_scala_provider),
4644
("write_executable", phase_common_write_executable),
4745
],
4846
# fixed phase

scala/private/rules/scala_junit_test.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ load(
1414
"phase_binary_final",
1515
"phase_common_java_wrapper",
1616
"phase_common_runfiles",
17-
"phase_common_scala_provider",
1817
"phase_declare_executable",
1918
"phase_junit_test_collect_jars",
2019
"phase_junit_test_compile",
@@ -46,7 +45,6 @@ def _scala_junit_test_impl(ctx):
4645
("compile", phase_junit_test_compile),
4746
("merge_jars", phase_merge_jars),
4847
("runfiles", phase_common_runfiles),
49-
("scala_provider", phase_common_scala_provider),
5048
("jvm_flags", phase_jvm_flags),
5149
("write_executable", phase_junit_test_write_executable),
5250
],

scala/private/rules/scala_library.bzl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ load(
2626
"phase_library_for_plugin_bootstrapping_collect_jars",
2727
"phase_library_for_plugin_bootstrapping_compile",
2828
"phase_library_runfiles",
29-
"phase_library_scala_provider",
3029
"phase_macro_library_collect_jars",
3130
"phase_macro_library_compile",
3231
"phase_merge_jars",
@@ -67,7 +66,6 @@ def _scala_library_impl(ctx):
6766
("merge_jars", phase_merge_jars),
6867
("runfiles", phase_library_runfiles),
6968
("collect_exports_jars", phase_collect_exports_jars),
70-
("scala_provider", phase_library_scala_provider),
7169
],
7270
# fixed phase
7371
("final", phase_library_final),
@@ -145,7 +143,6 @@ def _scala_library_for_plugin_bootstrapping_impl(ctx):
145143
("merge_jars", phase_merge_jars),
146144
("runfiles", phase_library_runfiles),
147145
("collect_exports_jars", phase_collect_exports_jars),
148-
("scala_provider", phase_library_scala_provider),
149146
],
150147
# fixed phase
151148
("final", phase_library_final),
@@ -202,7 +199,6 @@ def _scala_macro_library_impl(ctx):
202199
("merge_jars", phase_merge_jars),
203200
("runfiles", phase_library_runfiles),
204201
("collect_exports_jars", phase_collect_exports_jars),
205-
("scala_provider", phase_library_scala_provider),
206202
],
207203
# fixed phase
208204
("final", phase_library_final),

0 commit comments

Comments
 (0)