Change "rule" -> "target" in existing_rule() docs
RELNOTES: None
PiperOrigin-RevId: 218559308
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java
index 3e73359..0e4149e 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkNativeModuleApi.java
@@ -89,10 +89,13 @@
@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 @@
@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
)