Skip to content

Commit

Permalink
Fix cquery docs to list the same results as running the query.
Browse files Browse the repository at this point in the history
config_setting targets are returned by cquery, and were not listed originally, leading to some confusion.

PiperOrigin-RevId: 425922411
  • Loading branch information
katre authored and copybara-github committed Feb 2, 2022
1 parent 0ba4caa commit 2fd886b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions site/docs/cquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,23 @@ <h1> Configurable Query (cquery)</h1>
</pre>

<pre>
# Traditional query: query doesn't know which select() branch will be chosen
# so it conservatively lists all of them.
# Traditional query: query doesn't know which select() branch you will choose,
# so it conservatively lists all possible choices, including all used config_settings.
$ bazel query "deps(//tree:ash)" --noimplicit_deps
//tree:americana
//tree:ash
//tree:white-ash
//tree:manna-ash
//tree:common-ash
//tree:excelsior
//tree:manna-ash
//tree:white-ash

# cquery: cquery lets you set build options at the command line and chooses
# the exact dependencies that implies.
# the exact dependencies that implies (and also the config_setting targets).
$ bazel cquery "deps(//tree:ash)" --define species=excelsior --noimplicit_deps
//tree:ash (9f87702)
//tree:manna-ash (9f87702)
//tree:americana (9f87702)
//tree:excelsior (9f87702)
</pre>

<p>
Expand Down

0 comments on commit 2fd886b

Please sign in to comment.