Skip to content

Commit bf38df4

Browse files
alexeaglejasonaden
authored andcommittedMay 22, 2019
fix(bazel): allow ts_library interop with list-typed inputs (#30600)
_compile_action should take a list since we compute it within one node in the build graph This needs to be cleaned up since Bazel is getting stricter with disallowing iteration over depsets PR Close #30600
1 parent 79a0253 commit bf38df4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎packages/bazel/src/ng_module.bzl

+9-1
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,14 @@ def _compile_action(ctx, inputs, outputs, dts_bundles_out, messages_out, tsconfi
489489
# Give the Angular compiler all the user-listed assets
490490
file_inputs = list(ctx.files.assets)
491491

492+
if (type(inputs) == type([])):
493+
file_inputs.extend(inputs)
494+
else:
495+
# inputs ought to be a list, but allow depset as well
496+
# so that this can change independently of rules_typescript
497+
# TODO(alexeagle): remove this case after update (July 2019)
498+
file_inputs.extend(inputs.to_list())
499+
492500
if hasattr(ctx.attr, "node_modules"):
493501
file_inputs.extend(_filter_ts_inputs(ctx.files.node_modules))
494502

@@ -508,7 +516,7 @@ def _compile_action(ctx, inputs, outputs, dts_bundles_out, messages_out, tsconfi
508516
# Collect the inputs and summary files from our deps
509517
action_inputs = depset(
510518
file_inputs,
511-
transitive = [inputs] + [
519+
transitive = [
512520
dep.collect_summaries_aspect_result
513521
for dep in ctx.attr.deps
514522
if hasattr(dep, "collect_summaries_aspect_result")

0 commit comments

Comments
 (0)
Please sign in to comment.