Skip to content

Commit

Permalink
remove usage of attr scala with JavaInfo outputs (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
ittaiz authored and johnynek committed Jul 14, 2019
1 parent 86c392d commit 0b6cff3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions scala/private/rule_impls.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1239,13 +1239,8 @@ def _serialize_archives_short_path(archives):
def _get_test_archive_jars(ctx, test_archives):
flattened_list = []
for archive in test_archives:
# because we (rules_scala) use the legacy JavaInfo (java_common.create_provider)
# runtime_output_jars contains more jars than needed
if hasattr(archive, "scala"):
jars = [jar.class_jar for jar in archive.scala.outputs.jars]
else:
jars = archive[JavaInfo].runtime_output_jars
flattened_list.extend(jars)
class_jars = [java_output.class_jar for java_output in archive[JavaInfo].outputs.jars]
flattened_list.extend(class_jars)
return flattened_list

def scala_junit_test_impl(ctx):
Expand Down

0 comments on commit 0b6cff3

Please sign in to comment.