aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
diff options
context:
space:
mode:
authorGravatar Dmitry Lomov <dslomov@google.com>2017-05-03 17:23:17 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-05-04 13:12:43 +0200
commit20574298212975eb1e20595c5d36d4040763a478 (patch)
tree15117553e2ee1b4e0487d6aa3fc679dc468e68d1 /src/main/java/com/google/devtools/build/lib/rules
parent0acead4ea3631240659836ce6ecd6d7f67fd352b (diff)
Document output groups.
Work towards #2880. Change-Id: I7b661e368c0bd60fc6bcc10c7c1d63b82ba9702e PiperOrigin-RevId: 154957882
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
index 25c38d7a2d..2e8769eb75 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java
@@ -195,18 +195,20 @@ public class SkylarkRuleClassFunctions {
name = "DefaultInfo",
returnType = ClassObjectConstructor.class,
doc =
- "A provider that is provided by every rule, even if it iss not returned explicitly. "
+ "A provider that is provided by every rule, even if it is not returned explicitly. "
+ "A <code>DefaultInfo</code> accepts the following parameters:"
+ + "<ul>"
+ "<li><code>files</code></li>"
- + "<ul><li><code>runfiles</code></li>"
+ + "<li><code>runfiles</code></li>"
+ "<li><code>data_runfiles</code></li>"
+ "<li><code>default_runfiles</code></li>"
+ "</ul>"
+ "Each instance of the default provider contains the following standard "
+ "fields: "
+ + "<ul>"
+ "<li><code>files</code></li>"
+ "<li><code>files_to_run</code></li>"
- + "<ul><li><code>data_runfiles</code></li>"
+ + "<li><code>data_runfiles</code></li>"
+ "<li><code>default_runfiles</code></li>"
+ "</ul>"
)
@@ -215,7 +217,12 @@ public class SkylarkRuleClassFunctions {
@SkylarkSignature(
name = "OutputGroupInfo",
returnType = ClassObjectConstructor.class,
- doc = "todo"
+ doc =
+ "Provides information about output groups the rule provides.<br>"
+ + "Instantiate this provider with <br>"
+ + "<pre class=language-python>"
+ + "OutputGroupInfo(group1 = &lt;files&gt;, group2 = &lt;files&gt;...)</pre>"
+ + "See <a href=\"../rules.html#output-groups\">Output Groups</a> for more information"
)
private static final ClassObjectConstructor outputGroupInfo =
OutputGroupProvider.SKYLARK_CONSTRUCTOR;
@@ -239,13 +246,16 @@ public class SkylarkRuleClassFunctions {
)
private static final ClassObjectConstructor actions = ActionsProvider.SKYLARK_CONSTRUCTOR;
- @SkylarkSignature(name = "provider", returnType = ClassObjectConstructor.class, doc =
- "Creates a declared provider 'constructor'. The return value of this"
- + "function can be used to create \"struct-like\" values. Example:<br>"
- + "<pre class=\"language-python\">data = provider()\n"
- + "d = data(x = 2, y = 3)\n"
- + "return d.x + d.y # returns 5</pre>",
- useLocation = true
+ @SkylarkSignature(
+ name = "provider",
+ returnType = ClassObjectConstructor.class,
+ doc =
+ "Creates a declared provider 'constructor'. The return value of this"
+ + "function can be used to create \"struct-like\" values. Example:<br>"
+ + "<pre class=\"language-python\">data = provider()\n"
+ + "d = data(x = 2, y = 3)\n"
+ + "print(d.x + d.y) # prints 5</pre>",
+ useLocation = true
)
private static final BuiltinFunction provider =
new BuiltinFunction("provider") {