Skip to content

Commit 51fb079

Browse files
committed
build: support --incompatible_no_support_tools_in_action_inputs
Summary: One of many changes needed for Bazel 0.27.0; see #2355. As mentioned in a comment, the fact that `collect_runfiles` continues to be required surprises me: the `_tsc` `sh_binary` clearly declares `data` dependencies on both Node and `tsc.js`, but those are apparently not being included in the runfiles even when `_tsc` is passed in `tools`. Test Plan: The following command now works on Bazel 0.27.0: ``` bazel run \ --incompatible_depset_is_not_iterable=true \ --incompatible_disable_deprecated_attr_params=true \ --incompatible_new_actions_api=true \ --incompatible_no_support_tools_in_action_inputs=true \ --incompatible_use_python_toolchains=false \ //tensorboard -- --logdir ~/tensorboard_data ``` With the same `--incompatible_*` flags, all targets build and all tests pass. wchargin-branch: bazel-no-support-tools-in-action-inputs
1 parent 4ba5f51 commit 51fb079

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tensorboard/defs/vulcanize.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ def _tensorboard_html_binary(ctx):
4242
inputs=depset(transitive=[
4343
manifests,
4444
files,
45-
jslibs,
4645
ignore_regexs_file_set,
4746
]).to_list(),
47+
tools=jslibs,
4848
outputs=[ctx.outputs.html],
4949
executable=ctx.executable._Vulcanize,
5050
arguments=([ctx.attr.compilation_level,

tensorboard/defs/web.bzl

+6
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,18 @@ def _tf_web_library(ctx):
170170
[ts_config, er_config],
171171
transitive=[
172172
ts_inputs,
173+
# TODO(@wchargin): Because `_tsc` is passed as `tools`
174+
# below, collecting its runfiles should in principle be
175+
# unnecessary, but without this line the two deps of `_tsc`
176+
# (`tsc.js` and `@org_nodejs//:bin/node`) are in fact not
177+
# included, and so execrooter fails at runtime.
173178
collect_runfiles([ctx.attr._tsc]),
174179
ts_typings,
175180
ts_typings_execroots,
176181
],
177182
)
178183
ctx.actions.run(
184+
tools=ctx.files._tsc,
179185
inputs=ts_inputs,
180186
outputs=ts_outputs,
181187
executable=ctx.executable._execrooter,

0 commit comments

Comments
 (0)