diff options
author | Googler <noreply@google.com> | 2015-03-20 14:52:26 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-03-23 11:51:21 +0000 |
commit | e00c8848776e9d93ab6653e194d308bb839e7250 (patch) | |
tree | da04411b785a4c9f6a85e4de161a76ffdb3143f0 /src | |
parent | 185392d30734781580503bc8ff2e69693ad20eb7 (diff) |
Skylark: minor documentation cleanups.
--
MOS_MIGRATED_REVID=89123209
Diffstat (limited to 'src')
4 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java index 1e0980dee4..a2cb6f07e5 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildConfiguration.java @@ -1630,7 +1630,8 @@ public final class BuildConfiguration implements Serializable { /** * Returns a configuration fragment instances of the given class. */ - @SkylarkCallable(name = "fragment", doc = "Returns a configuration fragment using the key.") + @SkylarkCallable(name = "fragment", hidden = true, + doc = "Returns a configuration fragment using the key.") public <T extends Fragment> T getFragment(Class<T> clazz) { return clazz.cast(fragments.get(clazz)); } diff --git a/src/main/java/com/google/devtools/build/lib/packages/Attribute.java b/src/main/java/com/google/devtools/build/lib/packages/Attribute.java index 5ddf0ee8eb..cdd2c0ff83 100644 --- a/src/main/java/com/google/devtools/build/lib/packages/Attribute.java +++ b/src/main/java/com/google/devtools/build/lib/packages/Attribute.java @@ -28,6 +28,7 @@ import com.google.devtools.build.lib.syntax.ClassObject.SkylarkClassObject; import com.google.devtools.build.lib.syntax.EvalException; import com.google.devtools.build.lib.syntax.Label; import com.google.devtools.build.lib.syntax.SkylarkCallbackFunction; +import com.google.devtools.build.lib.syntax.SkylarkModule; import com.google.devtools.build.lib.util.FileType; import com.google.devtools.build.lib.util.FileTypeSet; import com.google.devtools.build.lib.util.StringUtil; @@ -87,6 +88,8 @@ public final class Attribute implements Comparable<Attribute> { * Declaration how the configuration should change when following a label or * label list attribute. */ + @SkylarkModule(name = "ConfigurationTransition", doc = + "Declares how the configuration should change when following a dependency.") public enum ConfigurationTransition implements Transition { /** No transition, i.e., the same configuration as the current. */ NONE, diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkFileType.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkFileType.java index be4a417845..3663726f90 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkFileType.java +++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkFileType.java @@ -47,7 +47,9 @@ public class SkylarkFileType { @SkylarkCallable(doc = "Returns a list created from the elements of the parameter containing all the " - + "<a href=\"#modules.File\"><code>File</code></a>s that match the FileType.") + + "<a href=\"#modules.File\"><code>File</code></a>s that match the FileType. The parameter " + + "must be a <a href=\"#modules.set\"><code>set</code></a> or a " + + "<a href=\"#modules.list\"><code>list</code></a>.") public List<Artifact> filter(Iterable<Artifact> files) { return ImmutableList.copyOf(FileType.filter(files, fileType)); } diff --git a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java index 13e6c4ed52..de9ba28eec 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java +++ b/src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleImplementationFunctions.java @@ -325,8 +325,8 @@ public class SkylarkRuleImplementationFunctions { @Param(name = "tools", type = SkylarkList.class, generic1 = TransitiveInfoCollection.class, doc = "list of tools (list of targets)"), @Param(name = "label_dict", type = Map.class, - doc = "dictionary of resolved labels and the corresponding list of artifacts " - + "(a dict of Label : list of files)")}) + doc = "dictionary of resolved labels and the corresponding list of Files " + + "(a dict of Label : list of Files)")}) private static final SkylarkFunction createCommandHelper = new SimpleSkylarkFunction("command_helper") { @SuppressWarnings("unchecked") |