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 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
8 changes: 2 additions & 6 deletions jmh/jmh.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,9 @@ 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")]
files = []
for scala in scala_targets:
files.append(scala.transitive_runtime_jars)
for java in java_targets:
files.append(java.transitive_runtime_deps)
[files.append(target[JavaInfo].transitive_runtime_deps) for target in deps if JavaInfo in target]

return depset(transitive = files)

def _scala_generate_benchmark(ctx):
Expand Down
6 changes: 2 additions & 4 deletions scala/private/common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ def collect_plugin_paths(plugins):
for p in plugins:
if hasattr(p, "path"):
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 JavaInfo in p:
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