Skip to content

Commit f6c81e4

Browse files
authored
Remove unnecessary use of ctx.resolve_tools. (#425)
We'd like to retire this API, which is redundant with passing an `executable` or `tools` argument to `ctx.actions.run|run_shell`.
1 parent 862c7f5 commit f6c81e4

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

dotnet/private/tests/use_as_tool/run_rule/run_rule.bzl

-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22

33
def _run_rule_impl(ctx):
44
output = ctx.actions.declare_file("{}_out".format(ctx.label.name))
5-
(inputs, input_manifests) = ctx.resolve_tools(tools = [ctx.attr.tool])
65

76
ctx.actions.run(
87
outputs = [output],
98
arguments = [output.path],
10-
inputs = inputs,
11-
input_manifests = input_manifests,
129
executable = ctx.executable.tool,
1310
)
1411

dotnet/private/tests/use_as_tool/run_shell_rule/run_shell_rule.bzl

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
def _run_shell_rule_impl(ctx):
44
output = ctx.actions.declare_file("{}_out".format(ctx.label.name))
5-
(inputs, input_manifests) = ctx.resolve_tools(tools = [ctx.attr.tool])
65

76
ctx.actions.run_shell(
87
outputs = [output],
9-
inputs = inputs,
10-
input_manifests = input_manifests,
118
command = "./{} {}".format(ctx.executable.tool.path, output.path),
9+
tools = [ctx.executable.tool],
1210
)
1311

1412
return [DefaultInfo(files = depset([output]))]

0 commit comments

Comments
 (0)