Add dependency pruning (unused_inputs_list) to tests #12504
Labels
P4
This is either out of scope or we don't have bandwidth to review a PR. (No assignee)
team-Rules-API
API for writing rules/aspects: providers, runfiles, actions, artifacts
type: feature request
Description of the problem / feature request:
Allow tests to be dependency pruned, for better caching.
Feature requests: what underlying problem are you trying to solve with this feature?
unused_input_list in actions addresses the problem of over-declared inputs. https://docs.bazel.build/versions/1.2.0/skylark/lib/actions.html#run
Tests have this same problem. Testing performance could be improved if unused inputs could be listed.
A number of testing frameworks have this feature (JS and Go).
Workaround
One workaround to achieve this is to convert tests into actions with unused_input_list, and use
bazel build
to "test." But this gives up a lot of the ergonomics aroundbazel test
.The text was updated successfully, but these errors were encountered: