diff --git a/lint/clang_tidy.bzl b/lint/clang_tidy.bzl index ae9beac1..0c78aa47 100644 --- a/lint/clang_tidy.bzl +++ b/lint/clang_tidy.bzl @@ -44,10 +44,10 @@ load("//lint/private:lint_aspect.bzl", "LintOptionsInfo", "noop_lint_action", "o _MNEMONIC = "AspectRulesLintClangTidy" def _gather_inputs(ctx, compilation_context, srcs): - inputs = srcs + ctx.files._configs + compilation_context.headers.to_list() + inputs = srcs + ctx.files._configs if (any(ctx.files._global_config)): inputs.append(ctx.files._global_config[0]) - return inputs + return depset(inputs, transitive = [compilation_context.headers]) def _toolchain_env(ctx, user_flags, action_name = ACTION_NAMES.cpp_compile): cc_toolchain = find_cpp_toolchain(ctx) @@ -349,7 +349,7 @@ def clang_tidy_fix(ctx, compilation_context, executable, srcs, patch, stdout, ex ) ctx.actions.run( - inputs = _gather_inputs(ctx, compilation_context, srcs) + [patch_cfg], + inputs = depset([patch_cfg], transitive = [_gather_inputs(ctx, compilation_context, srcs)]), outputs = [patch, stdout, exit_code], executable = executable._patcher, arguments = [patch_cfg.path], diff --git a/lint/eslint.bzl b/lint/eslint.bzl index 5042be85..93a69954 100644 --- a/lint/eslint.bzl +++ b/lint/eslint.bzl @@ -81,8 +81,7 @@ def _gather_inputs(ctx, srcs, files): include_transitive_types = True, include_npm_sources = True, ) - inputs.extend(js_inputs.to_list()) - return inputs + return depset(inputs, transitive = [js_inputs]) def eslint_action(ctx, executable, srcs, stdout, exit_code = None, format = "stylish", env = {}): """Create a Bazel Action that spawns an eslint process. @@ -184,7 +183,7 @@ def eslint_fix(ctx, executable, srcs, patch, stdout, exit_code, format = "stylis ) ctx.actions.run( - inputs = _gather_inputs(ctx, srcs, file_inputs) + [patch_cfg], + inputs = depset([patch_cfg], transitive = [_gather_inputs(ctx, srcs, file_inputs)]), outputs = [patch, stdout, exit_code], executable = executable._patcher, arguments = [patch_cfg.path], diff --git a/lint/stylelint.bzl b/lint/stylelint.bzl index ae60c2e2..728d6555 100644 --- a/lint/stylelint.bzl +++ b/lint/stylelint.bzl @@ -65,8 +65,7 @@ def _gather_inputs(ctx, srcs): include_transitive_types = False, include_npm_sources = True, ) - inputs.extend(js_inputs.to_list()) - return inputs + return depset(inputs, transitive = [js_inputs]) def stylelint_action(ctx, executable, srcs, stderr, exit_code = None, env = {}, options = []): """Spawn stylelint as a Bazel action @@ -145,7 +144,7 @@ def stylelint_fix(ctx, executable, srcs, patch, stderr, exit_code, env = {}, opt ) ctx.actions.run( - inputs = _gather_inputs(ctx, srcs) + [patch_cfg], + inputs = depset([patch_cfg], transitive = [_gather_inputs(ctx, srcs)]), outputs = [patch, stderr, exit_code], executable = executable._patcher, arguments = [patch_cfg.path],