From 47a73b18a8a673c8e6ba1744d98ef93c473c210e Mon Sep 17 00:00:00 2001 From: Daniel Muller Date: Thu, 13 Jan 2022 15:07:20 -0800 Subject: [PATCH] fix(cypress): use depsets for runfiles and data --- internal/node/node.bzl | 2 +- packages/cypress/internal/cypress_web_test.bzl | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/internal/node/node.bzl b/internal/node/node.bzl index be59fcce69..2c2f377f8e 100644 --- a/internal/node/node.bzl +++ b/internal/node/node.bzl @@ -157,7 +157,7 @@ def _join(*elements): def _nodejs_binary_impl(ctx, data = [], runfiles = [], expanded_args = []): node_modules_manifest = write_node_modules_manifest(ctx, link_workspace_root = ctx.attr.link_workspace_root) node_modules_depsets = [] - data = ctx.attr.data + data + data = depset(ctx.attr.data + data).to_list() # Also include files from npm fine grained deps as inputs. # These deps are identified by the ExternalNpmPackageInfo provider. diff --git a/packages/cypress/internal/cypress_web_test.bzl b/packages/cypress/internal/cypress_web_test.bzl index 6a45154e9e..8bd1498656 100644 --- a/packages/cypress/internal/cypress_web_test.bzl +++ b/packages/cypress/internal/cypress_web_test.bzl @@ -94,26 +94,25 @@ def _cypress_web_test_impl(ctx): cypressinfo.cypress_bin_path, ] - runfiles = ( + runfiles = depset( [plugin_wrapper] + ctx.files.config_file + ctx.files.cypress_npm_package + ctx.files.plugin_file + ctx.files.srcs + - cypressinfo.cypress_files + cypressinfo.cypress_files, ) - data = [ + data = depset([ ctx.attr.config_file, ctx.attr.cypress_npm_package, ctx.attr.plugin_file, - ctx.attr.srcs, - ] + ] + ctx.attr.srcs) return nodejs_test_kwargs["implementation"]( ctx, - data = data, - runfiles = runfiles, + data = data.to_list(), + runfiles = runfiles.to_list(), expanded_args = expanded_args, )