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

Migrate from old-style .java provider to JavaInfo. #807

Merged
merged 2 commits into from
Aug 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion jmh/jmh.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def jmh_repositories(maven_servers = ["http://central.maven.org/maven2"]):

def _scala_construct_runtime_classpath(deps):
scala_targets = [d.scala for d in deps if hasattr(d, "scala")]
java_targets = [d.java for d in deps if hasattr(d, "java")]
java_targets = [d[JavaInfo] for d in deps if hasattr(d, "JavaInfo")]
iirina marked this conversation as resolved.
Show resolved Hide resolved
files = []
for scala in scala_targets:
files.append(scala.transitive_runtime_jars)
Expand Down
4 changes: 2 additions & 2 deletions scala/private/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def collect_plugin_paths(plugins):
paths.append(p)
elif hasattr(p, "scala"):
paths.extend([j.class_jar for j in p.scala.outputs.jars])
elif hasattr(p, "java"):
paths.extend([j.class_jar for j in p.java.outputs.jars])
elif hasattr(p, "JavaInfo"):
iirina marked this conversation as resolved.
Show resolved Hide resolved
paths.extend([j.class_jar for j in p[JavaInfo].outputs.jars])
# support http_file pointed at a jar. http_jar uses ijar,
# which breaks scala macros

Expand Down