aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2015-04-01 14:06:13 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-04-01 15:36:37 +0000
commitf94cfd397347b5dd6c5c85a0e69924f0bbe54910 (patch)
tree9e1d057d43a55ad434aca3f694bfae948630329e /src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
parentaef370e27ca1cdfac6b89ecd7f91c5a097cb1e1d (diff)
Skylark: Mark ctx.target(s) as deprecated (use ctx.attr instead).
-- MOS_MIGRATED_REVID=90061261
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
index 1b3ee1d140..5e63a5727d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleContext.java
@@ -324,7 +324,8 @@ public final class SkylarkRuleContext {
* See {@link RuleContext#getPrerequisite(String, Mode)}.
*/
@SkylarkCallable(name = "target", structField = true,
- doc = "A <code>struct</code> containing prerequisite targets defined in label type "
+ doc = "<b>Deprecated, use <code>ctx.attr</code> instead.</b> "
+ + "A <code>struct</code> containing prerequisite targets defined in label type "
+ "attributes. The struct fields correspond to the attribute names. The struct value "
+ "is always a <a href=\"#modules.Target\"><code>Target</code></a> or <code>None</code>. "
+ "If an optional attribute is not specified in the rule, the corresponding struct "
@@ -337,7 +338,8 @@ public final class SkylarkRuleContext {
* See {@link RuleContext#getPrerequisites(String, Mode)}.
*/
@SkylarkCallable(name = "targets", structField = true,
- doc = "A <code>struct</code> containing prerequisite targets defined in label or label list "
+ doc = "<b>Deprecated, use <code>ctx.attr</code> instead.</b> "
+ + "A <code>struct</code> containing prerequisite targets defined in label or label list "
+ "type attributes. The struct fields correspond to the attribute names. The struct "
+ "values are <code>list</code> of <a href=\"#modules.Target\"><code>Target</code></a>s. "
+ "If an optional attribute is not specified in the rule, an empty list is generated.")