Label Target.label The identifier of the "
- + "target.
"
- + "
files
depset Target.files The set of "
- + "Files produced directly by this "
- + "target.
"
- + "
aspect_ids
list Target.aspect_ids The list of "
- + "aspect_ids applied to this "
- + "target.
"
- + "
Extra providers
For rule targets all "
- + "additional providers provided by this target are accessible as struct "
- + "fields. These extra providers are defined in the struct returned by the "
- + "rule implementation function.
*/
-@SkylarkModule(
- name = "configuration",
- category = SkylarkModuleCategory.BUILTIN,
- doc =
- "This object holds information about the environment in which the build is running. See "
- + "the Rules page for more on the general "
- + "concept of configurations."
-)
// TODO(janakr): If overhead of fragments class names is too high, add constructor that just takes
// fragments and gets names from them.
@AutoCodec
-public class BuildConfiguration {
+public class BuildConfiguration implements BuildConfigurationApi {
/**
* Sorts fragments by class name. This produces a stable order which, e.g., facilitates consistent
* output from buildMnemonic.
@@ -1453,8 +1444,7 @@ public class BuildConfiguration {
}
/** Returns the bin directory for this build configuration. */
- @SkylarkCallable(name = "bin_dir", structField = true, documented = false)
- @Deprecated
+ @Override
public ArtifactRoot getBinDirectory() {
return getBinDirectory(RepositoryName.MAIN);
}
@@ -1488,8 +1478,7 @@ public class BuildConfiguration {
}
/** Returns the genfiles directory for this build configuration. */
- @SkylarkCallable(name = "genfiles_dir", structField = true, documented = false)
- @Deprecated
+ @Override
public ArtifactRoot getGenfilesDirectory() {
return getGenfilesDirectory(RepositoryName.MAIN);
}
@@ -1538,8 +1527,7 @@ public class BuildConfiguration {
* not match the host platform. You should only use this when invoking tools that are known to use
* the native path separator, i.e., the path separator for the machine that they run on.
*/
- @SkylarkCallable(name = "host_path_separator", structField = true,
- doc = "Returns the separator for PATH environment variable, which is ':' on Unix.")
+ @Override
public String getHostPathSeparator() {
// TODO(bazel-team): Maybe do this in the constructor instead? This isn't serialization-safe.
return OS.getCurrent() == OS.WINDOWS ? ";" : ":";
@@ -1578,13 +1566,6 @@ public class BuildConfiguration {
return actionEnv;
}
- @SkylarkCallable(
- name = "default_shell_env",
- structField = true,
- doc =
- "A dictionary representing the static local shell environment. It maps variables "
- + "to their values (strings)."
- )
/**
* Return the "fixed" part of the actions' environment variables.
*
@@ -1596,7 +1577,7 @@ public class BuildConfiguration {
*
Since values of the "fixed" variables are already known at analysis phase, it is returned
* here as a map.
*/
- @Deprecated // Use getActionEnvironment instead.
+ @Override
public ImmutableMap getLocalShellEnvironment() {
return actionEnv.getFixedEnv();
}
@@ -1749,14 +1730,7 @@ public class BuildConfiguration {
* Returns user-specified test environment variables and their values, as set by the --test_env
* options.
*/
- @Deprecated
- @SkylarkCallable(
- name = "test_env",
- structField = true,
- doc =
- "A dictionary containing user-specified test environment variables and their values, "
- + "as set by the --test_env options. DO NOT USE! This is not the complete environment!"
- )
+ @Override
public ImmutableMap getTestEnv() {
return testEnv.getFixedEnv();
}
@@ -1785,11 +1759,7 @@ public class BuildConfiguration {
return options.deferParamFiles;
}
- @SkylarkCallable(name = "coverage_enabled", structField = true,
- doc = "A boolean that tells whether code coverage is enabled for this run. Note that this "
- + "does not compute whether a specific rule should be instrumented for code coverage "
- + "data collection. For that, see the "
- + "ctx.coverage_instrumented function.")
+ @Override
public boolean isCodeCoverageEnabled() {
return options.collectCodeCoverage;
}
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentCollection.java b/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentCollection.java
index bd053f4fb5..d396bcc174 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentCollection.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/FragmentCollection.java
@@ -18,26 +18,13 @@ import com.google.common.collect.ImmutableCollection;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.config.transitions.ConfigurationTransition;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
-import com.google.devtools.build.lib.syntax.ClassObject;
+import com.google.devtools.build.lib.skylarkbuildapi.FragmentCollectionApi;
import javax.annotation.Nullable;
-/**
- * Represents a collection of configuration fragments in Skylark.
- */
+/** Represents a collection of configuration fragments in Skylark. */
// Documentation can be found at ctx.fragments
@Immutable
-@SkylarkModule(name = "fragments",
- category = SkylarkModuleCategory.NONE,
- doc = "Possible fields are "
- + "apple, cpp, "
- + "java, jvm and "
- + "objc, android. "
- + "Access a specific fragment by its field name ex:
ctx.fragments.apple
"
- + "Note that rules have to declare their required fragments in order to access them "
- + "(see here).")
-public class FragmentCollection implements ClassObject {
+public class FragmentCollection implements FragmentCollectionApi {
private final RuleContext ruleContext;
private final ConfigurationTransition transition;
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttributesCollection.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttributesCollection.java
index 6821129be6..ae13ebf460 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttributesCollection.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkAttributesCollection.java
@@ -24,11 +24,8 @@ import com.google.devtools.build.lib.packages.Attribute;
import com.google.devtools.build.lib.packages.BuildType;
import com.google.devtools.build.lib.packages.Info;
import com.google.devtools.build.lib.packages.NativeProvider;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+import com.google.devtools.build.lib.skylarkbuildapi.SkylarkAttributesCollectionApi;
import com.google.devtools.build.lib.skylarkinterface.SkylarkPrinter;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkValue;
import com.google.devtools.build.lib.syntax.Environment;
import com.google.devtools.build.lib.syntax.EvalException;
import com.google.devtools.build.lib.syntax.Runtime;
@@ -41,12 +38,8 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-@SkylarkModule(
- name = "rule_attributes",
- category = SkylarkModuleCategory.NONE,
- doc = "Information about attributes of a rule an aspect is applied to."
-)
-class SkylarkAttributesCollection implements SkylarkValue {
+/** Information about attributes of a rule an aspect is applied to. */
+class SkylarkAttributesCollection implements SkylarkAttributesCollectionApi {
private final SkylarkRuleContext skylarkRuleContext;
private final Info attrObject;
private final Info executableObject;
@@ -91,35 +84,31 @@ class SkylarkAttributesCollection implements SkylarkValue {
skylarkRuleContext.checkMutable("rule." + attrName);
}
- @SkylarkCallable(name = "attr", structField = true, doc = SkylarkRuleContext.ATTR_DOC)
+ @Override
public Info getAttr() throws EvalException {
checkMutable("attr");
return attrObject;
}
- @SkylarkCallable(name = "executable", structField = true, doc = SkylarkRuleContext.EXECUTABLE_DOC)
+ @Override
public Info getExecutable() throws EvalException {
checkMutable("executable");
return executableObject;
}
- @SkylarkCallable(name = "file", structField = true, doc = SkylarkRuleContext.FILE_DOC)
+ @Override
public Info getFile() throws EvalException {
checkMutable("file");
return fileObject;
}
- @SkylarkCallable(name = "files", structField = true, doc = SkylarkRuleContext.FILES_DOC)
+ @Override
public Info getFiles() throws EvalException {
checkMutable("files");
return filesObject;
}
- @SkylarkCallable(
- name = "kind",
- structField = true,
- doc = "The kind of a rule, such as 'cc_library'"
- )
+ @Override
public String getRuleClassName() throws EvalException {
checkMutable("kind");
return ruleClassName;
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java
index 0614e1e33e..75e4f635d3 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkRuleContext.java
@@ -13,7 +13,7 @@
// limitations under the License.
package com.google.devtools.build.lib.analysis.skylark;
-
+
import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
@@ -43,7 +43,6 @@ import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
import com.google.devtools.build.lib.analysis.config.FragmentCollection;
import com.google.devtools.build.lib.analysis.config.HostTransition;
import com.google.devtools.build.lib.analysis.config.transitions.NoTransition;
-import com.google.devtools.build.lib.analysis.configuredtargets.AbstractConfiguredTarget;
import com.google.devtools.build.lib.analysis.configuredtargets.RuleConfiguredTarget.Mode;
import com.google.devtools.build.lib.analysis.stringtemplate.ExpansionException;
import com.google.devtools.build.lib.analysis.test.InstrumentedFilesCollector;
@@ -64,11 +63,9 @@ import com.google.devtools.build.lib.packages.Provider;
import com.google.devtools.build.lib.packages.RawAttributeMapper;
import com.google.devtools.build.lib.shell.ShellUtils;
import com.google.devtools.build.lib.shell.ShellUtils.TokenizationException;
-import com.google.devtools.build.lib.skylarkinterface.Param;
-import com.google.devtools.build.lib.skylarkinterface.ParamType;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;
-import com.google.devtools.build.lib.skylarkinterface.SkylarkModuleCategory;
+import com.google.devtools.build.lib.skylarkbuildapi.FileApi;
+import com.google.devtools.build.lib.skylarkbuildapi.FileRootApi;
+import com.google.devtools.build.lib.skylarkbuildapi.SkylarkRuleContextApi;
import com.google.devtools.build.lib.skylarkinterface.SkylarkPrinter;
import com.google.devtools.build.lib.skylarkinterface.SkylarkValue;
import com.google.devtools.build.lib.syntax.ClassObject;
@@ -99,108 +96,17 @@ import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
-/** A Skylark API for the ruleContext.
+/**
+ * A Skylark API for the ruleContext.
*
- * "This object becomes featureless once the rule implementation function that it was created for
+ *
"This object becomes featureless once the rule implementation function that it was created for
* has completed. To achieve this, the {@link #nullify()} should be called once the evaluation of
* the function is completed. The method both frees memory by deleting all significant fields of the
* object and makes it impossible to accidentally use this object where it's not supposed to be used
* (such attempts will result in {@link EvalException}s).
*/
-@SkylarkModule(
- name = "ctx",
- category = SkylarkModuleCategory.BUILTIN,
- doc =
- "The context of the rule containing helper functions and "
- + "information about attributes, depending targets and outputs. "
- + "You get a ctx object as an argument to the implementation function when "
- + "you create a rule."
-)
-public final class SkylarkRuleContext implements SkylarkValue {
-
- private static final String DOC_NEW_FILE_TAIL = "Does not actually create a file on the file "
- + "system, just declares that some action will do so. You must create an action that "
- + "generates the file. If the file should be visible to other rules, declare a rule output "
- + "instead when possible. Doing so enables Blaze to associate a label with the file that "
- + "rules can refer to (allowing finer dependency control) instead of referencing the whole "
- + "rule.";
- public static final String EXECUTABLE_DOC =
- "A struct containing executable files defined in label type "
- + "attributes marked as executable=True. The struct fields correspond "
- + "to the attribute names. Each value in the struct is either a file or "
- + "None. If an optional attribute is not specified in the rule "
- + "then the corresponding struct value is None. If a label type is not "
- + "marked as executable=True, no corresponding struct field is generated. "
- + "See example of use.";
- public static final String FILES_DOC =
- "A struct containing files defined in label or label list "
- + "type attributes. The struct fields correspond to the attribute names. The struct "
- + "values are list of files. "
- + "It is a shortcut for:"
- + "
[f for t in ctx.attr.<ATTR> for f in t.files]
"
- + "In other words, use files to access the "
- + "default outputs of a "
- + "dependency. "
- + ""
- + "See example of use.";
- public static final String FILE_DOC =
- "A struct containing files defined in label type "
- + "attributes marked as allow_single_file. The struct fields correspond "
- + "to the attribute names. The struct value is always a file or "
- + "None. If an optional attribute is not specified in the rule "
- + "then the corresponding struct value is None. If a label type is not "
- + "marked as allow_single_file, no corresponding struct field is generated. "
- + "It is a shortcut for:"
- + "
list(ctx.attr.<ATTR>.files)[0]
"
- + "In other words, use file to access the (singular) "
- + "default output of a "
- + "dependency. "
- + "See example of use.";
- public static final String ATTR_DOC =
- "A struct to access the values of the attributes. The values are provided by "
- + "the user (if not, a default value is used). The attributes of the struct and the "
- + "types of their values correspond to the keys and values of the attrs "
- + "dict provided to the rule function. "
- + "See example of use.";
- public static final String SPLIT_ATTR_DOC =
- "A struct to access the values of attributes with split configurations. If the attribute is "
- + "a label list, the value of split_attr is a dict of the keys of the split (as strings) "
- + "to lists of the ConfiguredTargets in that branch of the split. If the attribute is a "
- + "label, then the value of split_attr is a dict of the keys of the split (as strings) "
- + "to single ConfiguredTargets. Attributes with split configurations still appear in the "
- + "attr struct, but their values will be single lists with all the branches of the split "
- + "merged together.";
- public static final String OUTPUTS_DOC =
- "A pseudo-struct containing all the predeclared output files, represented by "
- + "File objects. See the "
- + "Rules page for more information and examples."
- + "
This field does not exist on aspect contexts, since aspects do not have "
- + "predeclared outputs."
- + "
The fields of this object are defined as follows. It is an error if two outputs "
- + "produce the same field name or have the same label."
- + "
"
- + "
If the rule declares an outputs"
- + " dict, then for every entry in the dict, there is a field whose name is the key "
- + "and whose value is the corresponding File."
- + "
For every attribute of type attr.output"
- + " that the rule declares, there is a field whose name is the attribute's name. "
- + "If the target specified a label for that attribute, then the field value is the "
- + "corresponding File; otherwise the field value is None."
- + "
For every attribute of type attr.output_list"
- + " that the rule declares, there is a field whose name is the attribute's "
- + "name. The field value is a list of File objects corresponding to the "
- + "labels given for that attribute in the target, or an empty list if the attribute was "
- + "not specified in the target."
- + "
(Deprecated) If the rule is marked "
- + "executable or test,"
- + "there is a field named \"executable\", which is the default executable. "
- + "It is recommended that instead of using this, you pass another file (either "
- + "predeclared or not) to the executable arg of "
- + "DefaultInfo."
- + "
";
+public final class SkylarkRuleContext implements SkylarkRuleContextApi {
+
public static final Function ATTRIBUTE_VALUE_EXTRACTOR_FOR_ASPECT =
new Function() {
@Nullable
@@ -573,34 +479,17 @@ public final class SkylarkRuleContext implements SkylarkValue {
return ruleContext;
}
- @SkylarkCallable(
- name = "default_provider",
- structField = true,
- doc = "Deprecated. Use DefaultInfo instead."
- )
- public static Provider getDefaultProvider() {
+ @Override
+ public Provider getDefaultProvider() {
return DefaultInfo.PROVIDER;
}
- @SkylarkCallable(
- name = "actions",
- structField = true,
- doc = "Functions to declare files and create actions."
- )
+ @Override
public SkylarkActionFactory actions() {
return actionFactory;
}
- @SkylarkCallable(name = "created_actions",
- doc = "For rules with _skylark_testable"
- + " set to True, this returns an "
- + "Actions provider representing all actions "
- + "created so far for the current rule. For all other rules, returns None. "
- + "Note that the provider is not updated when subsequent actions are created, so you "
- + "will have to call this function again if you wish to inspect them. "
- + "
"
- + "This is intended to help write tests for rule-implementation helper functions, which "
- + "may take in a ctx object and create actions on it.")
+ @Override
public SkylarkValue createdActions() throws EvalException {
checkMutable("created_actions");
if (ruleContext.getRule().getRuleClassObject().isSkylarkTestable()) {
@@ -611,13 +500,13 @@ public final class SkylarkRuleContext implements SkylarkValue {
}
}
- @SkylarkCallable(name = "attr", structField = true, doc = ATTR_DOC)
+ @Override
public Info getAttr() throws EvalException {
checkMutable("attr");
return attributesCollection.getAttr();
}
- @SkylarkCallable(name = "split_attr", structField = true, doc = SPLIT_ATTR_DOC)
+ @Override
public Info getSplitAttr() throws EvalException {
checkMutable("split_attr");
if (splitAttributes == null) {
@@ -628,88 +517,63 @@ public final class SkylarkRuleContext implements SkylarkValue {
}
/** See {@link RuleContext#getExecutablePrerequisite(String, Mode)}. */
- @SkylarkCallable(name = "executable", structField = true, doc = EXECUTABLE_DOC)
+ @Override
public Info getExecutable() throws EvalException {
checkMutable("executable");
return attributesCollection.getExecutable();
}
/** See {@link RuleContext#getPrerequisiteArtifact(String, Mode)}. */
- @SkylarkCallable(name = "file", structField = true, doc = FILE_DOC)
+ @Override
public Info getFile() throws EvalException {
checkMutable("file");
return attributesCollection.getFile();
}
/** See {@link RuleContext#getPrerequisiteArtifacts(String, Mode)}. */
- @SkylarkCallable(name = "files", structField = true, doc = FILES_DOC)
+ @Override
public Info getFiles() throws EvalException {
checkMutable("files");
return attributesCollection.getFiles();
}
- @SkylarkCallable(name = "workspace_name", structField = true,
- doc = "Returns the workspace name as defined in the WORKSPACE file.")
+ @Override
public String getWorkspaceName() throws EvalException {
checkMutable("workspace_name");
return ruleContext.getWorkspaceName();
}
- @SkylarkCallable(name = "label", structField = true, doc = "The label of this rule.")
+ @Override
public Label getLabel() throws EvalException {
checkMutable("label");
return ruleContext.getLabel();
}
- @SkylarkCallable(name = "fragments", structField = true,
- doc = "Allows access to configuration fragments in target configuration.")
+ @Override
public FragmentCollection getFragments() throws EvalException {
checkMutable("fragments");
return fragments;
}
- @SkylarkCallable(name = "host_fragments", structField = true,
- doc = "Allows access to configuration fragments in host configuration.")
+ @Override
public FragmentCollection getHostFragments() throws EvalException {
checkMutable("host_fragments");
return hostFragments;
}
- @SkylarkCallable(name = "configuration", structField = true,
- doc = "Returns the default configuration. See the "
- + "configuration type for more details.")
+ @Override
public BuildConfiguration getConfiguration() throws EvalException {
checkMutable("configuration");
return ruleContext.getConfiguration();
}
- @SkylarkCallable(name = "host_configuration", structField = true,
- doc = "Returns the host configuration. See the "
- + "configuration type for more details.")
+ @Override
public BuildConfiguration getHostConfiguration() throws EvalException {
checkMutable("host_configuration");
return ruleContext.getHostConfiguration();
}
- @SkylarkCallable(name = "coverage_instrumented",
- doc = "Returns whether code coverage instrumentation should be generated when performing "
- + "compilation actions for this rule or, if target is provided, the rule "
- + "specified by that Target. (If a non-rule or a Skylark rule Target is provided, this "
- + "returns False.) Checks if the sources of the current rule (if no Target is provided) or"
- + "the sources of Target should be instrumented based on the --instrumentation_filter and"
- + "--instrument_test_targets config settings. "
- + "This differs from coverage_enabled in the "
- + "configuration, which notes whether coverage data collection is enabled for the "
- + "entire run, but not whether a specific target should be instrumented.",
- parameters = {
- @Param(
- name = "target",
- type = TransitiveInfoCollection.class,
- defaultValue = "None",
- noneable = true,
- named = true,
- doc = "A Target specifying a rule. If not provided, defaults to the current rule.")
- })
+ @Override
public boolean instrumentCoverage(Object targetUnchecked) throws EvalException {
checkMutable("coverage_instrumented");
BuildConfiguration config = ruleContext.getConfiguration();
@@ -724,35 +588,25 @@ public final class SkylarkRuleContext implements SkylarkValue {
&& InstrumentedFilesCollector.shouldIncludeLocalSources(config, target);
}
- @SkylarkCallable(name = "features", structField = true,
- doc = "Returns the set of features that are enabled for this rule."
- )
+ @Override
public ImmutableList getFeatures() throws EvalException {
checkMutable("features");
return ImmutableList.copyOf(ruleContext.getFeatures());
}
- @SkylarkCallable(
- name = "bin_dir",
- structField = true,
- doc = "The root corresponding to bin directory."
- )
+ @Override
public ArtifactRoot getBinDirectory() throws EvalException {
checkMutable("bin_dir");
return getConfiguration().getBinDirectory(ruleContext.getRule().getRepository());
}
- @SkylarkCallable(
- name = "genfiles_dir",
- structField = true,
- doc = "The root corresponding to genfiles directory."
- )
+ @Override
public ArtifactRoot getGenfilesDirectory() throws EvalException {
checkMutable("genfiles_dir");
return getConfiguration().getGenfilesDirectory(ruleContext.getRule().getRepository());
}
- @SkylarkCallable(structField = true, doc = OUTPUTS_DOC)
+ @Override
public ClassObject outputs() throws EvalException {
checkMutable("outputs");
if (outputsObject == null) {
@@ -761,12 +615,7 @@ public final class SkylarkRuleContext implements SkylarkValue {
return outputsObject;
}
- @SkylarkCallable(
- structField = true,
- doc =
- "Returns rule attributes descriptor for the rule that aspect is applied to."
- + " Only available in aspect implementation functions."
- )
+ @Override
public SkylarkAttributesCollection rule() throws EvalException {
checkMutable("rule");
if (!isForAspect) {
@@ -776,10 +625,7 @@ public final class SkylarkRuleContext implements SkylarkValue {
return ruleAttributesCollection;
}
- @SkylarkCallable(structField = true,
- name = "aspect_ids",
- doc = "Returns a list ids for all aspects applied to the target."
- + " Only available in aspect implementation functions.")
+ @Override
public ImmutableList aspectIds() throws EvalException {
checkMutable("aspect_ids");
if (!isForAspect) {
@@ -794,16 +640,13 @@ public final class SkylarkRuleContext implements SkylarkValue {
return result.build();
}
- @SkylarkCallable(
- structField = true,
- doc = "Dictionary (String to String) of configuration variables."
- )
+ @Override
public SkylarkDict var() throws EvalException {
checkMutable("var");
return makeVariables;
}
- @SkylarkCallable(structField = true, doc = "Toolchains required for this rule.")
+ @Override
public SkylarkIndexable toolchains() throws EvalException {
checkMutable("toolchains");
return ruleContext.getToolchainContext().getResolvedToolchainProviders();
@@ -814,7 +657,7 @@ public final class SkylarkRuleContext implements SkylarkValue {
return ruleLabelCanonicalName;
}
- @SkylarkCallable(doc = "Splits a shell command to a list of tokens.", documented = false)
+ @Override
public SkylarkList tokenize(String optionString) throws FuncallException, EvalException {
checkMutable("tokenize");
List options = new ArrayList<>();
@@ -826,13 +669,7 @@ public final class SkylarkRuleContext implements SkylarkValue {
return SkylarkList.createImmutable(options);
}
- @SkylarkCallable(
- 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. "
- + "Deprecated.",
- documented = false
- )
+ @Override
public String expand(
@Nullable String expression, SkylarkList