Skip to content

Commit 0b6cff3

Browse files
ittaizjohnynek
authored andcommitted
remove usage of attr scala with JavaInfo outputs (#784)
1 parent 86c392d commit 0b6cff3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

scala/private/rule_impls.bzl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,13 +1239,8 @@ def _serialize_archives_short_path(archives):
12391239
def _get_test_archive_jars(ctx, test_archives):
12401240
flattened_list = []
12411241
for archive in test_archives:
1242-
# because we (rules_scala) use the legacy JavaInfo (java_common.create_provider)
1243-
# runtime_output_jars contains more jars than needed
1244-
if hasattr(archive, "scala"):
1245-
jars = [jar.class_jar for jar in archive.scala.outputs.jars]
1246-
else:
1247-
jars = archive[JavaInfo].runtime_output_jars
1248-
flattened_list.extend(jars)
1242+
class_jars = [java_output.class_jar for java_output in archive[JavaInfo].outputs.jars]
1243+
flattened_list.extend(class_jars)
12491244
return flattened_list
12501245

12511246
def scala_junit_test_impl(ctx):

0 commit comments

Comments
 (0)