aquery: get actions used in clean build
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
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.
Contributor guide
Research direction
Start by reading the existing aquery behavior for actions in a target's dependency closure and run it against a target with unused or malformed dependencies. Define the result as the transitive actions needed for the target's default outputs in a clean build, then verify that unrelated actions are excluded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100