Change "rule" -> "target" in existing_rule() docs
RELNOTES: None
@@ -89,10 +89,13 @@ public interface SkylarkNativeModuleApi {
@SkylarkCallable(
name = "existing_rule",
doc =
- "Returns a dictionary representing the attributes of a previously defined rule, "
- + "or None if the rule does not exist.",
+ "Returns a dictionary representing the attributes of a previously defined target, or "
+ + "<code>None</code> if the target does not exist."
+ + ""
+ + "<p><i>Note: If possible, avoid using this function. It makes BUILD files brittle "
+ + "and order-dependent.",
parameters = {
- @Param(name = "name", type = String.class, doc = "The name of the rule.")
+ @Param(name = "name", type = String.class, doc = "The name of the target.")
},
useAst = true,
useEnvironment = true
@@ -103,9 +106,12 @@ public interface SkylarkNativeModuleApi {
@SkylarkCallable(
name = "existing_rules",
doc =
- "Returns a dict containing all the rules instantiated so far. "
- + "The map key is the name of the rule. The map value is equivalent to the "
- + "existing_rule output for that rule.",
+ "Returns a dictionary containing all the targets instantiated so far. The map key is the "
+ + "name of the target. The map value is equivalent to the <code>existing_rule</code> "
+ + "output for that target."
+ + ""
+ + "<p><i>Note: If possible, avoid using this function. It makes BUILD files brittle "
+ + "and order-dependent.",
useAst = true,
useEnvironment = true
)
