Make @SkylarkCallable.name mandatory. RELNOTES: None. PiperOrigin-RevId: 201748802
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleContextApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleContextApi.java index 7c1be4c..12c2c52 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleContextApi.java +++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkRuleContextApi.java
@@ -264,10 +264,15 @@ ) public FileRootApi getGenfilesDirectory() throws EvalException; - @SkylarkCallable(structField = true, doc = OUTPUTS_DOC) + @SkylarkCallable( + name = "outputs", + structField = true, + doc = OUTPUTS_DOC + ) public ClassObject outputs() throws EvalException; @SkylarkCallable( + name = "rule", structField = true, doc = "Returns rule attributes descriptor for the rule that aspect is applied to." @@ -276,8 +281,8 @@ public SkylarkAttributesCollectionApi rule() throws EvalException; @SkylarkCallable( - structField = true, name = "aspect_ids", + structField = true, doc = "Returns a list ids for all aspects applied to the target." + " Only available in aspect implementation functions." @@ -285,18 +290,28 @@ public ImmutableList<String> aspectIds() throws EvalException; @SkylarkCallable( + name = "var", structField = true, doc = "Dictionary (String to String) of configuration variables." ) public SkylarkDict<String, String> var() throws EvalException; - @SkylarkCallable(structField = true, doc = "Toolchains required for this rule.") + @SkylarkCallable( + name = "toolchains", + structField = true, + doc = "Toolchains required for this rule." + ) public SkylarkIndexable toolchains() throws EvalException; - @SkylarkCallable(doc = "Splits a shell command to a list of tokens.", documented = false) + @SkylarkCallable( + name = "tokenize", + doc = "Splits a shell command to a list of tokens.", + documented = false + ) public SkylarkList<String> tokenize(String optionString) throws FuncallException, EvalException; @SkylarkCallable( + name = "expand", doc = "Expands all references to labels embedded within a string for all files using a mapping " + "from definition labels (i.e. the label in the output type attribute) to files. " @@ -366,11 +381,15 @@ ) public FileApi newDirectory(String name, Object siblingArtifactUnchecked) throws EvalException; - @SkylarkCallable(documented = false) + @SkylarkCallable( + name = "check_placeholders", + documented = false + ) public boolean checkPlaceholders(String template, SkylarkList<Object> allowedPlaceholders) throws EvalException; @SkylarkCallable( + name = "expand_make_variables", doc = "<b>Deprecated.</b> Use <a href=\"ctx.html#var\">ctx.var</a> to access the variables " + "instead.<br>Returns a string after expanding all references to \"Make "