From d2554049abdfa2ed1ef558bf13fa736723b848f9 Mon Sep 17 00:00:00 2001 From: Long Cao Date: Wed, 19 Jun 2019 18:32:27 -0400 Subject: [PATCH 1/3] a JavaInfo provider should be given for deps --- scala/scala.bzl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scala/scala.bzl b/scala/scala.bzl index fa4f3ec8f..72719ecef 100644 --- a/scala/scala.bzl +++ b/scala/scala.bzl @@ -126,10 +126,13 @@ _common_attrs_for_plugin_bootstrapping = { ".srcjar", ".java", ]), - "deps": attr.label_list(aspects = [ - _collect_plus_one_deps_aspect, - _coverage_replacements_provider.aspect, - ]), + "deps": attr.label_list( + aspects = [ + _collect_plus_one_deps_aspect, + _coverage_replacements_provider.aspect, + ], + providers = [[JavaInfo]], + ), "plugins": attr.label_list(allow_files = [".jar"]), "runtime_deps": attr.label_list(providers = [[JavaInfo]]), "data": attr.label_list(allow_files = True), @@ -695,4 +698,4 @@ def scala_specs2_junit_test(name, **kwargs): **kwargs ) -scala_doc = _scala_doc \ No newline at end of file +scala_doc = _scala_doc From 5de16b54294b39d45b4907c7693942e876204915 Mon Sep 17 00:00:00 2001 From: Long Cao Date: Wed, 19 Jun 2019 22:47:31 -0400 Subject: [PATCH 2/3] flatten providers lists --- scala/scala.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scala/scala.bzl b/scala/scala.bzl index 72719ecef..ecd004fcb 100644 --- a/scala/scala.bzl +++ b/scala/scala.bzl @@ -131,10 +131,10 @@ _common_attrs_for_plugin_bootstrapping = { _collect_plus_one_deps_aspect, _coverage_replacements_provider.aspect, ], - providers = [[JavaInfo]], + providers = [JavaInfo], ), "plugins": attr.label_list(allow_files = [".jar"]), - "runtime_deps": attr.label_list(providers = [[JavaInfo]]), + "runtime_deps": attr.label_list(providers = [JavaInfo]), "data": attr.label_list(allow_files = True), "resources": attr.label_list(allow_files = True), "resource_strip_prefix": attr.string(), @@ -673,7 +673,7 @@ _scala_junit_test_attrs.update(_common_attrs) _scala_junit_test_attrs.update(_junit_resolve_deps) _scala_junit_test_attrs.update({ - "tests_from": attr.label_list(providers = [[JavaInfo]]), + "tests_from": attr.label_list(providers = [JavaInfo]), }) scala_junit_test = rule( From d9f9fe85edb34533810792d3d48492b89e913686 Mon Sep 17 00:00:00 2001 From: Long Cao Date: Thu, 20 Jun 2019 10:49:40 -0400 Subject: [PATCH 3/3] Revert "flatten providers lists" This reverts commit a464f61f80c9dd70cb0f719fa226d3364fab8bd4. --- scala/scala.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scala/scala.bzl b/scala/scala.bzl index ecd004fcb..72719ecef 100644 --- a/scala/scala.bzl +++ b/scala/scala.bzl @@ -131,10 +131,10 @@ _common_attrs_for_plugin_bootstrapping = { _collect_plus_one_deps_aspect, _coverage_replacements_provider.aspect, ], - providers = [JavaInfo], + providers = [[JavaInfo]], ), "plugins": attr.label_list(allow_files = [".jar"]), - "runtime_deps": attr.label_list(providers = [JavaInfo]), + "runtime_deps": attr.label_list(providers = [[JavaInfo]]), "data": attr.label_list(allow_files = True), "resources": attr.label_list(allow_files = True), "resource_strip_prefix": attr.string(), @@ -673,7 +673,7 @@ _scala_junit_test_attrs.update(_common_attrs) _scala_junit_test_attrs.update(_junit_resolve_deps) _scala_junit_test_attrs.update({ - "tests_from": attr.label_list(providers = [JavaInfo]), + "tests_from": attr.label_list(providers = [[JavaInfo]]), }) scala_junit_test = rule(