仓库指标
- Star
- (25,384 star)
- PR 合并指标
- (平均合并 22天 20小时) (30 天内合并 77 个 PR)
描述
Hey awesome Bazel team,
I'd love a way to aquery for precisely the actions used in a building a target.
In deeper detail: When introspecting the build of a given target, you'd like be able to aquery the actions that would be run in a clean build of that target. [More precisely, you'd like to be able to easily aquery the transitive closure of actions involved in building the default outputs of a target.]
Currently, aquery provides something that seems similar, but is actually a problematic superset: You can ask for all the actions of all the dependencies of a target. This is a superset of the above that includes actions that are unused and unneeded--and sometimes unconfigured or otherwise malformed and problematic.
Background goal: I'm building a tool that uses aquery to build clangd-powered autocomplete for VSCode and some other editors. This involves extracting the compile commands used in a build--and it's awesome to be able to query actions with aquery. Other Bazel users keep asking me to open source the tool, and I noticed this quirk in behavior while trying to polish up some edge cases.
Thanks so much, Chris (ex-Googler)
P.S. I'd emailed with some of the aquery folks about this previously (@joeleba)--I'm posting it here to have a place to publicly discuss/track for anyone reading the source of the tool when I release it.