blob: 63cce8b4e61542a6a978b46b577f309478c9620e [file] [log] [blame]
{namespace buck.query}
/***/
{template .soyweb}
{call buck.page}
{param title: 'buck query' /}
{param content}
{call buck.command}
{param overview}
Queries the build dependency graph.
<p>
This can be used to find a path from one dependency to another in the build graph.
The format of the query is <code><em>source</em> -> <em>sink</em></code> as follows:
<pre>buck query '&#x2F;/apps/myapp:app -> &#x2F;/res/com/example/activity:res'</pre>
It can also be used to find the set of transitive dependencies for a build rule by omitting the
sink in the query expression:
<pre>buck query '&#x2F;/apps/myapp:app -> '</pre>
In addition to using fully-qualified build targets such as <code>&#x2F;/apps/myapp:app</code>,
you can also use aliases that you have declared in the <code>[alias]</code> section of
your {call buck.concept_buckconfig /} file in your query:
<pre>buck query 'app -> &#x2F;/some/unexpected:dependency'</pre>
<p>
This can be useful in untangling your dependencies, or for general scripting against
the build graph.
{/param}
{param params}
None.
{/param}
{/call}
{/param} // content
{/call} // buck.page
{/template}