@@ -62,10 +62,10 @@ def _deps_query_arg():
62
62
return {
63
63
"deps_query" : attrs .option (attrs .query (), default = None , doc = """
64
64
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:
67
67
68
- * `attrfilter`
68
+ * `attrfilter`
69
69
* `deps`
70
70
* `except`
71
71
* `intersect`
@@ -74,42 +74,22 @@ def _deps_query_arg():
74
74
* `set`
75
75
* `union`
76
76
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:
94
78
95
79
```
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'))"
99
82
"deps('//foo:foo', 1)"
100
83
```
101
-
102
- Note: any targets included in this query must also be present in `deps`.
103
84
""" ),
104
85
}
105
86
106
87
def _provided_deps_query_arg ():
107
88
return {
108
89
"provided_deps_query" : attrs .option (attrs .query (), default = None , doc = """
109
90
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.
113
93
""" ),
114
94
}
115
95
0 commit comments