Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
make skylark.bzl compatible with --incompatible_depset_is_not_iterable (
Browse files Browse the repository at this point in the history
  • Loading branch information
c-parsons committed Nov 20, 2018
1 parent 300e540 commit 9bbdf62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions skylark/skylark.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def _skylark_doc_impl(ctx):
skylark_doc_zip = ctx.outputs.skylark_doc_zip
direct = []
transitive = []
skydoc = _skydoc(ctx)
for dep in ctx.attr.srcs:
if SkylarkLibraryInfo in dep:
direct.extend(dep[SkylarkLibraryInfo].srcs)
Expand All @@ -41,7 +42,7 @@ def _skylark_doc_impl(ctx):
inputs = depset(order = "postorder", direct = direct, transitive = transitive + [
dep[SkylarkLibraryInfo].transitive_srcs
for dep in ctx.attr.deps
])
] + [depset([skydoc])])
sources = [source.path for source in direct]
flags = [
"--format=%s" % ctx.attr.format,
Expand All @@ -57,9 +58,8 @@ def _skylark_doc_impl(ctx):
flags += ["--link_ext=%s" % ctx.attr.link_ext]
if ctx.attr.site_root:
flags += ["--site_root=%s" % ctx.attr.site_root]
skydoc = _skydoc(ctx)
ctx.actions.run(
inputs = list(inputs) + [skydoc],
inputs = inputs,
executable = skydoc,
arguments = flags + sources,
outputs = [skylark_doc_zip],
Expand Down

0 comments on commit 9bbdf62

Please sign in to comment.