Skip to content

Commit d269f5a

Browse files
Ian Childsfacebook-github-bot
Ian Childs
authored andcommitted
Fix docs on $declared_deps and $declared
Summary: These docs are from `buck1`, we don't support this in `buck2`. Reviewed By: iguridi Differential Revision: D71474271 fbshipit-source-id: 6064631f7cd2b3478aed30efb7c63584bfc4bd09
1 parent f0aa4f6 commit d269f5a

File tree

1 file changed

+8
-28
lines changed

1 file changed

+8
-28
lines changed

prelude/decls/common.bzl

+8-28
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def _deps_query_arg():
6262
return {
6363
"deps_query": attrs.option(attrs.query(), default = None, doc = """
6464
Status: **experimental/unstable**.
65-
The deps query takes a query string that accepts the following query functions, and appends the
66-
output of the query to the declared deps:
65+
The deps query takes a query string that accepts the following query
66+
functions, and appends the output of the query to the declared deps:
6767
68-
* `attrfilter`
68+
* `attrfilter`
6969
* `deps`
7070
* `except`
7171
* `intersect`
@@ -74,42 +74,22 @@ def _deps_query_arg():
7474
* `set`
7575
* `union`
7676
77-
78-
The macro `$declared_deps` may be used anywhere a target literal pattern is expected
79-
in order to refer to the explicit deps of this rule as they appear in the rule's definition.
80-
For example, if your build rule declares
81-
82-
```
83-
84-
android_library(
85-
name = 'lib',
86-
deps = ['//foo:foo'],
87-
deps_query = '$declared_deps',
88-
)
89-
```
90-
91-
then the macro `$declared_deps` would be expanded to a
92-
literal `set(//foo:foo)`.
93-
Some example queries:
77+
Some example queries:
9478
9579
```
96-
97-
"filter({name_regex}, $declared_deps)".format(name_regex='//.*')
98-
"attrfilter(annotation_processors, com.foo.Processor, $declared_deps)"
80+
"filter({name_regex}, deps('//foo:foo'))".format(name_regex='//.*')
81+
"attrfilter(annotation_processors, com.foo.Processor, deps('//foo:foo'))"
9982
"deps('//foo:foo', 1)"
10083
```
101-
102-
Note: any targets included in this query must also be present in `deps`.
10384
"""),
10485
}
10586

10687
def _provided_deps_query_arg():
10788
return {
10889
"provided_deps_query": attrs.option(attrs.query(), default = None, doc = """
10990
Status: **experimental/unstable**.
110-
The provided deps query functions in the same way as the deps query, but the referenced deps
111-
using `$declared` are the provided deps of the target, and the results of the query
112-
are appended to the declared provided deps.
91+
The provided deps query functions in the same way as the deps query, but the
92+
results of the query are appended to the declared provided deps.
11393
"""),
11494
}
11595

0 commit comments

Comments
 (0)