diff options
author | 2016-02-01 18:39:42 +0000 | |
---|---|---|
committer | 2016-02-02 14:57:35 +0000 | |
commit | d5ef2b4956619c44c9d17ac097857508e4d53b40 (patch) | |
tree | e51de7e9541fa1eb346fe5a9876ca5b61ccd7cdf /src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java | |
parent | dccd81fe23111818d63a61d882f65a8b412de4e2 (diff) |
Rollback of commit f941d56acfad5f8c819c81b494f806ea74ea7fd8.
*** Reason for rollback ***
Breaks many targets, see []
*** Original change description ***
Reinstate mutable SkylarkDict
Add <String, Object> annotation to optionMap invocation in SkylarkAttr,
to make JDK 1.7 happy.
Give the visible name "aspect" to class SkylarkAspect.
--
MOS_MIGRATED_REVID=113543873
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/SkylarkRuleClassFunctions.java | 12 |
1 files changed, 3 insertions, 9 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 4ff90d9944..5fb0bc5db1 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 @@ -69,7 +69,6 @@ import com.google.devtools.build.lib.packages.SkylarkAspectClass; import com.google.devtools.build.lib.packages.TargetUtils; import com.google.devtools.build.lib.packages.TestSize; import com.google.devtools.build.lib.rules.SkylarkAttr.Descriptor; -import com.google.devtools.build.lib.skylarkinterface.SkylarkModule; import com.google.devtools.build.lib.skylarkinterface.SkylarkSignature; import com.google.devtools.build.lib.skylarkinterface.SkylarkSignature.Param; import com.google.devtools.build.lib.skylarkinterface.SkylarkValue; @@ -86,7 +85,6 @@ import com.google.devtools.build.lib.syntax.FunctionSignature; import com.google.devtools.build.lib.syntax.Printer; import com.google.devtools.build.lib.syntax.Runtime; import com.google.devtools.build.lib.syntax.SkylarkCallbackFunction; -import com.google.devtools.build.lib.syntax.SkylarkDict; import com.google.devtools.build.lib.syntax.SkylarkList; import com.google.devtools.build.lib.syntax.SkylarkNestedSet; import com.google.devtools.build.lib.syntax.SkylarkSignatureProcessor; @@ -226,8 +224,7 @@ public class SkylarkRuleClassFunctions { doc = "Whether this rule is a test rule. " + "If True, the rule must end with <code>_test</code> (otherwise it must not), " + "and there must be an action that generates <code>ctx.outputs.executable</code>."), - @Param(name = "attrs", type = SkylarkDict.class, noneable = true, defaultValue = "None", - doc = + @Param(name = "attrs", type = Map.class, noneable = true, defaultValue = "None", doc = "dictionary to declare all the attributes of the rule. It maps from an attribute name " + "to an attribute object (see <a href=\"attr.html\">attr</a> module). " + "Attributes starting with <code>_</code> are private, and can be used to add " @@ -236,7 +233,7 @@ public class SkylarkRuleClassFunctions { + "<code>deprecation</code>, <code>tags</code>, <code>testonly</code>, and " + "<code>features</code> are implicitly added and might be overriden."), // TODO(bazel-team): need to give the types of these builtin attributes - @Param(name = "outputs", type = SkylarkDict.class, callbackEnabled = true, noneable = true, + @Param(name = "outputs", type = Map.class, callbackEnabled = true, noneable = true, defaultValue = "None", doc = "outputs of this rule. " + "It is a dictionary mapping from string to a template name. " + "For example: <code>{\"ext\": \"%{name}.ext\"}</code>. <br>" @@ -365,7 +362,7 @@ public class SkylarkRuleClassFunctions { doc = "List of attribute names. The aspect propagates along dependencies specified by " + " attributes of a target with this name" ), - @Param(name = "attrs", type = SkylarkDict.class, noneable = true, defaultValue = "None", + @Param(name = "attrs", type = Map.class, noneable = true, defaultValue = "None", doc = "dictionary to declare all the attributes of the aspect. " + "It maps from an attribute name to an attribute object " + "(see <a href=\"attr.html\">attr</a> module). " @@ -709,7 +706,6 @@ public class SkylarkRuleClassFunctions { /** * A Skylark value that is a result of 'aspect(..)' function call. */ - @SkylarkModule(name = "aspect", doc = "", documented = false) public static final class SkylarkAspect implements SkylarkValue { private final BaseFunction implementation; private final ImmutableList<String> attributeAspects; @@ -852,12 +848,10 @@ public class SkylarkRuleClassFunctions { return aspectDefinition; } - @Override public Label getExtensionLabel() { return extensionLabel; } - @Override public String getExportedName() { return exportedName; } |