Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove usage of attr scala with JavaInfo outputs #784

Merged
merged 1 commit into from
Jul 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions scala/private/rule_impls.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1236,13 +1236,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