forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report prunable inputs in
aquery
output.
The input sets reported by `aquery` are rather subtly defined for actions that discover inputs: 1. Prunable headers are unconditionally absent before action execution, and present after action execution if they're deemed reachable by include scanning or if scanning is disabled. 2. If the action produces an unused inputs list (or the native C++ equivalent based on the .d file), inputs thus marked are absent after action execution. The difference in treatment between prunable headers and other inputs is, in my opinion, a case of implementation details leaking into the conceptual model: from a user's perspective, it's more natural to describe actions as starting with every header in the inputs and discarding the unreachable ones during execution, mirroring unused inputs; but depsets don't support subtraction, so implementation-wise we found it convenient to start with no headers and later add the reachable ones. bazelbuild@6b912c5 partially addressed this by means of a separate "scheduling dependencies" output field containing the full set of prunable headers. However, this field can't be the target of an `inputs` predicate, limiting the utility of `aquery` as a tool to investigate scheduling dependencies. On the other hand, there's currently no workaround for revealing inputs explicitly marked as unused after they've been pruned (short of a `clean` command). To comprehensively address these issues, this CL introduces a new `--include_pruned_inputs` flag, which gates the inclusion of pruned inputs into the existing inputs field. The implementation treats prunable headers identically to other inputs: initially present, but possibly absent after execution. The flag defaults to enabled, as user feedback suggests that it's a more intuitive default. The previously introduced `--include_scheduling_dependencies` flag, which hasn't yet made it into a stable Bazel release, is deleted. Fixes bazelbuild#23154. RELNOTES[INC]: The `aquery` command now reports all potential inputs of actions that support input discovery, including the input headers of C++ compilation actions and those explicitly marked as unused through the `unused_inputs_list` argument to `ctx.actions.run`. Set `--noinclude_pruned_inputs` to omit pruned inputs from `aquery` output when running it after action execution. RELNOTES[INC]: This is not a release note, but a reminder to remove the note for `--include_scheduling_dependencies`, which was introduced in the 8.x tree but won't make it into the final release. PiperOrigin-RevId: 670969727 Change-Id: Ibe442ef3e061004c5951df9fce1c1613cd6e7647
- Loading branch information
1 parent
4ab411c
commit 4c4bbec
Showing
28 changed files
with
430 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.