From 3753422e737a0efdac1e0dea0d38672a48991df3 Mon Sep 17 00:00:00 2001 From: Alex Thompson Date: Wed, 5 Jun 2019 10:15:24 -0400 Subject: [PATCH] Updated all instances of direct iteration over a depset to use .to_list() Fixes #58 --- internal/js_library/rule.bzl | 6 +++--- internal/ts_library/rule.bzl | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/js_library/rule.bzl b/internal/js_library/rule.bzl index e1af732..7e97af7 100644 --- a/internal/js_library/rule.bzl +++ b/internal/js_library/rule.bzl @@ -103,7 +103,7 @@ def _js_library_create_full_src(ctx, internal_deps, npm_packages): npm_packages[NpmPackagesInfo].installed_dir, ] + [ d[JsLibraryInfo].compiled_javascript_dir - for d in internal_deps + for d in internal_deps.to_list() ] + ctx.files.srcs, outputs = [ctx.outputs.compiled_javascript_dir], executable = ctx.file._internal_nodejs, @@ -119,7 +119,7 @@ def _js_library_create_full_src(ctx, internal_deps, npm_packages): ("|".join([ (";".join(d[JsLibraryInfo].javascript_source_files)) + ":" + d[JsLibraryInfo].compiled_javascript_dir.path - for d in internal_deps + for d in internal_deps.to_list() ])), # List of source files, which will be processed ("import" statements # automatically replaced) and copied into the new directory. @@ -141,7 +141,7 @@ def _js_library_compile(ctx, internal_deps, npm_packages): npm_packages[NpmPackagesInfo].installed_dir, ] + [ d[JsLibraryInfo].compiled_javascript_dir - for d in internal_deps + for d in internal_deps.to_list() ], outputs = [ctx.outputs.compiled_dir], executable = ctx.file._internal_nodejs, diff --git a/internal/ts_library/rule.bzl b/internal/ts_library/rule.bzl index 591b3b5..0b82d50 100644 --- a/internal/ts_library/rule.bzl +++ b/internal/ts_library/rule.bzl @@ -132,7 +132,7 @@ def _ts_library_create_full_src(ctx, internal_deps, npm_packages, output_dir, fo ctx.file.tsconfig, ] + [ d[TsLibraryInfo].original_typescript_dir if for_compilation and TsLibraryInfo in d else d[JsLibraryInfo].compiled_javascript_dir - for d in internal_deps + for d in internal_deps.to_list() ] + ctx.files.srcs, outputs = [output_dir], executable = ctx.file._internal_nodejs, @@ -158,7 +158,7 @@ def _ts_library_create_full_src(ctx, internal_deps, npm_packages, output_dir, fo ( d[TsLibraryInfo].original_typescript_dir.path if for_compilation and TsLibraryInfo in d else d[JsLibraryInfo].compiled_javascript_dir.path ) - for d in internal_deps + for d in internal_deps.to_list() ])), # List of source files, which will be processed ("import" statements # automatically replaced) and copied into the new directory. @@ -180,7 +180,7 @@ def _ts_library_compile(ctx, internal_deps, npm_packages): npm_packages[NpmPackagesInfo].installed_dir, ] + [ d[TsLibraryInfo].original_typescript_dir if TsLibraryInfo in d else d[JsLibraryInfo].compiled_javascript_dir - for d in internal_deps + for d in internal_deps.to_list() ], outputs = [ctx.outputs.compiled_dir], executable = ctx.file._internal_nodejs, @@ -207,7 +207,7 @@ def _ts_library_transpile(ctx, internal_deps, npm_packages): npm_packages[NpmPackagesInfo].installed_dir, ] + [ d[JsLibraryInfo].compiled_javascript_dir - for d in internal_deps + for d in internal_deps.to_list() ], outputs = [ctx.outputs.transpiled_dir], executable = ctx.file._internal_nodejs,