From ab072dfd2691d306b11c29c48f6c66f396a99b54 Mon Sep 17 00:00:00 2001 From: Laurent Le Brun Date: Thu, 23 May 2019 19:39:06 +0200 Subject: [PATCH 1/2] Fix repository for compatibility with --incompatible_no_support_tools_in_action_inputs --- rules/private/copy_file_private.bzl | 2 +- rules/run_binary.bzl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rules/private/copy_file_private.bzl b/rules/private/copy_file_private.bzl index c39459cc..b531815a 100644 --- a/rules/private/copy_file_private.bzl +++ b/rules/private/copy_file_private.bzl @@ -48,7 +48,7 @@ def copy_cmd(ctx, src, dst): def copy_bash(ctx, src, dst): ctx.actions.run_shell( - inputs = [src], + tools = [src], outputs = [dst], command = "cp -f \"$1\" \"$2\"", arguments = [src.path, dst.path], diff --git a/rules/run_binary.bzl b/rules/run_binary.bzl index 76a5393a..469c6bb6 100644 --- a/rules/run_binary.bzl +++ b/rules/run_binary.bzl @@ -23,7 +23,7 @@ load("//lib:dicts.bzl", "dicts") def _impl(ctx): tool_as_list = [ctx.attr.tool] tool_inputs, tool_input_mfs = ctx.resolve_tools(tools = tool_as_list) - args = [ + args = [ # Expand $(location) / $(locations) in args. # # To keep the rule simple, do not expand Make Variables (like *_binary.args usually would). @@ -44,7 +44,8 @@ def _impl(ctx): } ctx.actions.run( outputs = ctx.outputs.outs, - inputs = depset(direct = ctx.files.srcs, transitive = [tool_inputs]), + inputs = depset(direct = ctx.files.srcs), + tools = tool_inputs, executable = ctx.executable.tool, arguments = args, mnemonic = "RunBinary", From 48a1543a003481bad26914a16daf4ef75a2676ff Mon Sep 17 00:00:00 2001 From: Laurent Le Brun Date: Thu, 23 May 2019 19:54:31 +0200 Subject: [PATCH 2/2] Remove useless call to depse --- rules/run_binary.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/run_binary.bzl b/rules/run_binary.bzl index 469c6bb6..5c7fe68c 100644 --- a/rules/run_binary.bzl +++ b/rules/run_binary.bzl @@ -44,7 +44,7 @@ def _impl(ctx): } ctx.actions.run( outputs = ctx.outputs.outs, - inputs = depset(direct = ctx.files.srcs), + inputs = ctx.files.srcs, tools = tool_inputs, executable = ctx.executable.tool, arguments = args,