aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Liam Miller-Cushon <cushon@google.com>2015-04-10 19:22:36 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-04-13 11:47:48 +0000
commit06b09ce978eb984bee3a83ed446aab2dce60fa43 (patch)
treefaa2066c426386370fa8c552c77d2323e16aa139
parent8e9083578e073c3f8ca1c4c54c67c823b618933d (diff)
Document new blaze query 'visible' filter
Follow-up to [] RELNOTES: N/A -- MOS_MIGRATED_REVID=90829261
-rw-r--r--site/docs/query.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/site/docs/query.html b/site/docs/query.html
index b4b0e600ce..cdb24adb44 100644
--- a/site/docs/query.html
+++ b/site/docs/query.html
@@ -1273,6 +1273,27 @@ genrule(
3 characters long due to the <code>//</code> and <code>:</code>).
</p>
+<h3 id="visible">Rule visibility filtering: visible</h3>
+<pre>expr ::= visible(<var>expr</var>, <var>expr</var>) </pre>
+<p>
+ The <code>visible(<var>predicate</var>, <var>input</var>)</code> operator
+ applies a filter to a set of targets, and discards targets without the
+ required visibility.
+</p>
+
+<p>
+ The first argument, <var>predicate</var>, is a set of targets that all targets
+ in the output must be visible to. A <var>visible</var> expression
+ evaluates to the set containing all targets <var>x</var> such that <var>x</var>
+ is a member of the set <var>input</var>, and for all targets <var>y</var> in
+ <var>predicate</var> <var>x</var> is visible to <var>y</var>. For example:
+</p>
+<pre>visible(//foo, //bar:*)</pre>
+<p>
+ will select all targets in the package <code>//bar</code> that <code>//foo</code>
+ can depend on without violating visibility restrictions.
+</p>
+
<h3 id="labels">Evaluation of rule attributes of type label: labels</h3>
<pre>expr ::= labels(<var>word</var>, <var>expr</var>) </pre>
<p>