Skip to content

Commit 2de8142

Browse files
authored
java_indexer aspect.get_source_jar: check if type is depset (#130)
Existing code assumes this will return a list. In newer versions of bazel, the source_jars is a depset.
1 parent 4af086f commit 2de8142

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/java_indexer_aspect.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _get_forwarded_deps(target, ctx):
145145
def get_source_jars(output):
146146
"""Returns a list of source jars from the output."""
147147
if hasattr(output, "source_jars"):
148-
return output.source_jars
148+
return output.source_jars.to_list() if type(output.source_jars) == "depset" else output.source_jars
149149
if hasattr(output, "source_jar"):
150150
return [output.source_jar]
151151
return []

0 commit comments

Comments
 (0)