Skylark -> Starlark comment and doc updates
- Also a few string literals.
There's lots more, so I'm breaking this into chunks.
PiperOrigin-RevId: 305900457
diff --git a/src/BUILD b/src/BUILD
index 5758d38..42fe065 100644
--- a/src/BUILD
+++ b/src/BUILD
@@ -103,7 +103,7 @@
]
# TODO(philwo): Clean this up, once a Bazel that can run py_binary and sh_binary
-# in Skylark rules on Windows has been released.
+# in Starlark rules on Windows has been released.
[filegroup(
name = "embedded_tools" + suffix + "_srcs",
srcs = JAVA_TOOLS + [
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredTarget.java b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredTarget.java
index 0716c72..b834eff 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredTarget.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredTarget.java
@@ -57,12 +57,12 @@
@Nullable
BuildConfigurationValue.Key getConfigurationKey();
- /** Returns keys for a legacy Skylark provider. */
+ /** Returns keys for a legacy Starlark provider. */
@Override
ImmutableCollection<String> getFieldNames();
/**
- * Returns a legacy Skylark provider.
+ * Returns a legacy Starlark provider.
*
* <p>Overrides {@link ClassObject#getValue(String)}, but does not allow EvalException to be
* thrown.
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java
index dcd250c..5f81b3e 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/config/BuildOptions.java
@@ -169,7 +169,7 @@
}
/*
- * Returns a BuildOptions class that only has skylark options.
+ * Returns a BuildOptions class that only has Starlark options.
*/
@VisibleForTesting
public static BuildOptions of(Map<Label, Object> skylarkOptions) {
@@ -231,7 +231,7 @@
/**
* Creates a copy of the BuildOptions object that contains copies of the FragmentOptions and
- * skylark options.
+ * Starlark options.
*/
@Override
public BuildOptions clone() {
@@ -307,7 +307,7 @@
/** Maps options class definitions to FragmentOptions objects. */
private final ImmutableMap<Class<? extends FragmentOptions>, FragmentOptions> fragmentOptionsMap;
- /** Maps skylark options names to skylark options values. */
+ /** Maps Starlark options names to Starlark options values. */
private final ImmutableMap<Label, Object> skylarkOptionsMap;
@AutoCodec.VisibleForSerialization
@@ -634,7 +634,7 @@
}
}
- // Compare skylark options for the two classes.
+ // Compare Starlark options for the two classes.
Map<Label, Object> skylarkFirst = first.getStarlarkOptions();
Map<Label, Object> skylarkSecond = second.getStarlarkOptions();
for (Label buildSetting : Sets.union(skylarkFirst.keySet(), skylarkSecond.keySet())) {
@@ -754,7 +754,7 @@
private final Map<Label, Object> skylarkFirst = new LinkedHashMap<>();
// TODO(b/112041323): This should also be multimap but we don't diff multiple times with
- // skylark options anywhere yet so add that feature when necessary.
+ // Starlark options anywhere yet so add that feature when necessary.
private final Map<Label, Object> skylarkSecond = new LinkedHashMap<>();
private final List<Label> extraStarlarkOptionsFirst = new ArrayList<>();
diff --git a/src/main/java/com/google/devtools/build/lib/packages/AspectClass.java b/src/main/java/com/google/devtools/build/lib/packages/AspectClass.java
index 723736e..e84b66d 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/AspectClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/AspectClass.java
@@ -14,7 +14,6 @@
package com.google.devtools.build.lib.packages;
-
/**
* A class of aspects.
*
@@ -45,7 +44,7 @@
* on a rule so that it can do meaningful work (for example, dexing only makes sense for configured
* targets that produce Java code).
*
- * <p>Aspects can be defined natively, in Java ({@link NativeAspectClass}) or in Skylark ({@link
+ * <p>Aspects can be defined natively, in Java ({@link NativeAspectClass}) or in Starlark ({@link
* SkylarkAspectClass}).
*
* <p>Bazel propagates aspects through a multistage process. The general pipeline is as follows:
@@ -57,7 +56,7 @@
* {@code AspectDescriptor} <- {@link AspectParameters}
* \
* V
- * {@link Aspect} <- {@link AspectDefinition} (might require loading Skylark files)
+ * {@link Aspect} <- {@link AspectDefinition} (might require loading Starlark files)
* |
* V
* {@code ConfiguredAspect} <- {@code ConfiguredTarget}
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 3ff28d9..439b8c2 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
@@ -638,7 +638,7 @@
}
/**
- * See value(TYPE) above. This method is only meant for Skylark usage.
+ * See value(TYPE) above. This method is only meant for Starlark usage.
*
* <p>The parameter {@code context} is relevant iff the default value is a Label string. In this
* case, {@code context} must point to the parent Label in order to be able to convert the
diff --git a/src/main/java/com/google/devtools/build/lib/packages/AttributeFormatter.java b/src/main/java/com/google/devtools/build/lib/packages/AttributeFormatter.java
index 2fad851..681270c 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/AttributeFormatter.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/AttributeFormatter.java
@@ -141,7 +141,7 @@
.setHasDefaultValue(selector.hasDefault());
// Note that the order of entries returned by selector.getEntries is stable. The map's
- // entries' order is preserved from the fact that Skylark dictionary entry order is stable
+ // entries' order is preserved from the fact that Starlark dictionary entry order is stable
// (it's determined by insertion order).
for (Map.Entry<Label, ?> entry : selector.getEntries().entrySet()) {
Label condition = entry.getKey();
diff --git a/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java b/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java
index 7dd4437..7776fbb 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java
@@ -182,7 +182,7 @@
/**
* A dictionary that maps configurations (NONE for target configuration, HOST for host
- * configuration) to lists of Skylark module names of required configuration fragments.
+ * configuration) to lists of Starlark module names of required configuration fragments.
*/
private final ImmutableSetMultimap<ConfigurationTransition, String>
starlarkRequiredConfigurationFragments;
diff --git a/src/main/java/com/google/devtools/build/lib/packages/FilesetEntry.java b/src/main/java/com/google/devtools/build/lib/packages/FilesetEntry.java
index 99e8ab2..5d2f66e 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/FilesetEntry.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/FilesetEntry.java
@@ -48,7 +48,7 @@
@Override
public boolean isImmutable() {
// TODO(laszlocsomor): set this to true. I think we could do this right now, but am not sure.
- // Maybe we have to verify that Skylark recognizes every member's type to be recursively
+ // Maybe we have to verify that Starlark recognizes every member's type to be recursively
// immutable; as of 15/01/2016 this is not true for enum types in general, to name an example.
return false;
}
diff --git a/src/main/java/com/google/devtools/build/lib/packages/ImplicitOutputsFunction.java b/src/main/java/com/google/devtools/build/lib/packages/ImplicitOutputsFunction.java
index fb2d177..c8dd28a 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/ImplicitOutputsFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/ImplicitOutputsFunction.java
@@ -61,7 +61,8 @@
public abstract class ImplicitOutputsFunction {
/**
- * Implicit output functions for Skylark supporting key value access of expanded implicit outputs.
+ * Implicit output functions for Starlark supporting key value access of expanded implicit
+ * outputs.
*/
public abstract static class SkylarkImplicitOutputsFunction extends ImplicitOutputsFunction {
@@ -75,7 +76,7 @@
}
}
- /** Implicit output functions executing Skylark code. */
+ /** Implicit output functions executing Starlark code. */
@AutoCodec
public static final class SkylarkImplicitOutputsFunctionWithCallback
extends SkylarkImplicitOutputsFunction {
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RequiredProviders.java b/src/main/java/com/google/devtools/build/lib/packages/RequiredProviders.java
index 2f026c8..9af7ae2 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RequiredProviders.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RequiredProviders.java
@@ -36,7 +36,7 @@
* see any other aspect applied to a target.
* <li>accept a dependency that provides all providers from one of several sets of providers. It
* just so happens that in all current usages these sets are either all native providers or
- * all Skylark providers, so this is the only use case this class currently supports.
+ * all Starlark providers, so this is the only use case this class currently supports.
* </ul>
*/
@Immutable
@@ -357,10 +357,10 @@
}
/**
- * Add an alternative set of Skylark providers.
+ * Add an alternative set of Starlark providers.
*
- * If all of these providers are present in the dependency, the dependency satisfies
- * {@link RequiredProviders}.
+ * <p>If all of these providers are present in the dependency, the dependency satisfies {@link
+ * RequiredProviders}.
*/
public Builder addSkylarkSet(ImmutableSet<SkylarkProviderIdentifier> skylarkProviderSet) {
constraint = Constraint.RESTRICTED;
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
index bfbbecd..d6df897 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
@@ -625,7 +625,7 @@
}
/**
- * Name of default attribute implicitly added to all Skylark RuleClasses that are {@code
+ * Name of default attribute implicitly added to all Starlark RuleClasses that are {@code
* build_setting}s.
*/
public static final String SKYLARK_BUILD_SETTING_DEFAULT_ATTR_NAME = "build_setting_default";
@@ -958,7 +958,7 @@
* configuration.
*
* <p>In contrast to {@link #requiresConfigurationFragments(Class...)}, this method takes the
- * Skylark module names of fragments instead of their classes.
+ * Starlark module names of fragments instead of their classes.
*/
public Builder requiresConfigurationFragmentsBySkylarkModuleName(
Collection<String> configurationFragmentNames) {
@@ -970,19 +970,18 @@
/**
* Declares the configuration fragments that are required by this rule for the host
* configuration.
- *
*/
/**
- * Declares that the implementation of the associated rule class requires the given
- * fragments to be present in the given configuration that isn't the rule's configuration but
- * is also readable by the rule.
+ * Declares that the implementation of the associated rule class requires the given fragments to
+ * be present in the given configuration that isn't the rule's configuration but is also
+ * readable by the rule.
*
* <p>In contrast to {@link #requiresConfigurationFragments(ConfigurationTransition, Class...)},
- * this method takes Skylark module names of fragments instead of their classes.
- * *
+ * this method takes Starlark module names of fragments instead of their classes. *
+ *
* <p>You probably don't want to use this, because rules generally shouldn't read configurations
- * other than their own. If you want to declare host config fragments, see
- * {@link com.google.devtools.build.lib.analysis.config.ConfigAwareRuleClassBuilder}.
+ * other than their own. If you want to declare host config fragments, see {@link
+ * com.google.devtools.build.lib.analysis.config.ConfigAwareRuleClassBuilder}.
*
* <p>The value is inherited by subclasses.
*/
@@ -1207,10 +1206,10 @@
}
/**
- * Adds or overrides the attribute in the rule class. Meant for Skylark usage.
+ * Adds or overrides the attribute in the rule class. Meant for Starlark usage.
*
* @throws IllegalArgumentException if the attribute overrides an existing attribute (will be
- * legal in the future).
+ * legal in the future).
*/
public void addOrOverrideAttribute(Attribute attribute) {
String name = attribute.getName();
@@ -1225,7 +1224,7 @@
return attributes.containsKey(name);
}
- /** Sets the rule implementation function. Meant for Skylark usage. */
+ /** Sets the rule implementation function. Meant for Starlark usage. */
public Builder setConfiguredTargetFunction(StarlarkFunction func) {
this.configuredTargetFunction = func;
return this;
@@ -1241,7 +1240,7 @@
return this;
}
- /** Sets the rule definition environment label and hash code. Meant for Skylark usage. */
+ /** Sets the rule definition environment label and hash code. Meant for Starlark usage. */
public Builder setRuleDefinitionEnvironmentLabelAndHashCode(Label label, String hashCode) {
this.ruleDefinitionEnvironmentLabel = Preconditions.checkNotNull(label, this.name);
this.ruleDefinitionEnvironmentHashCode = Preconditions.checkNotNull(hashCode, this.name);
@@ -1266,8 +1265,8 @@
}
/**
- * This rule class outputs a default executable for every rule with the same name as
- * the rules's. Only works for Skylark.
+ * This rule class outputs a default executable for every rule with the same name as the
+ * rules's. Only works for Starlark.
*/
public <TYPE> Builder setExecutableSkylark() {
this.isExecutableSkylark = true;
@@ -1294,7 +1293,7 @@
}
/**
- * This rule class has the _whitelist_function_transition attribute. Intended only for Skylark
+ * This rule class has the _whitelist_function_transition attribute. Intended only for Starlark
* rules.
*/
public <TYPE> Builder setHasFunctionTransitionWhitelist() {
@@ -1476,7 +1475,7 @@
private final String name; // e.g. "cc_library"
private final ImmutableList<StarlarkThread.CallStackEntry> callstack; // of call to 'rule'
- private final String key; // Just the name for native, label + name for skylark
+ private final String key; // Just the name for native, label + name for Starlark
/**
* The kind of target represented by this RuleClass (e.g. "cc_library rule").
@@ -1546,12 +1545,13 @@
private final AdvertisedProviderSet advertisedProviders;
/**
- * The Skylark rule implementation of this RuleClass. Null for non Skylark executable RuleClasses.
+ * The Starlark rule implementation of this RuleClass. Null for non Starlark executable
+ * RuleClasses.
*/
@Nullable private final StarlarkFunction configuredTargetFunction;
/**
- * The BuildSetting associated with this rule. Null for all RuleClasses except Skylark-defined
+ * The BuildSetting associated with this rule. Null for all RuleClasses except Starlark-defined
* rules that pass {@code build_setting} to their {@code rule()} declaration.
*/
@Nullable private final BuildSetting buildSetting;
@@ -1567,8 +1567,8 @@
private final Function<? super Rule, ? extends Set<String>> optionReferenceFunction;
/**
- * The Skylark rule definition environment's label and hash code of this RuleClass. Null for non
- * Skylark executable RuleClasses.
+ * The Starlark rule definition environment's label and hash code of this RuleClass. Null for non
+ * Starlark executable RuleClasses.
*/
@Nullable private final Label ruleDefinitionEnvironmentLabel;
@@ -2116,12 +2116,12 @@
// have been set.
for (Attribute attr : attrsWithComputedDefaults) {
// If Attribute#hasComputedDefault was true above, Attribute#getDefaultValue returns the
- // computed default function object or a Skylark computed default template. Note that we
+ // computed default function object or a Starlark computed default template. Note that we
// cannot determine the exact value of the computed default function here because it may
// depend on other attribute values that are configurable (i.e. they came from select({..})
// expressions in the build language, and they require configuration data from the analysis
// phase to be resolved). Instead, we're setting the attribute value to a reference to the
- // computed default function, or if #getDefaultValue is a Skylark computed default
+ // computed default function, or if #getDefaultValue is a Starlark computed default
// template, setting the attribute value to a reference to the SkylarkComputedDefault
// returned from SkylarkComputedDefaultTemplate#computePossibleValues.
//
@@ -2501,7 +2501,7 @@
return binaryOutput;
}
- /** Returns this RuleClass's custom Skylark rule implementation. */
+ /** Returns this RuleClass's custom Starlark rule implementation. */
@Nullable
public StarlarkFunction getConfiguredTargetFunction() {
return configuredTargetFunction;
@@ -2528,7 +2528,7 @@
}
/**
- * For Skylark rule classes, returns this RuleClass's rule definition environment's label, which
+ * For Starlark rule classes, returns this RuleClass's rule definition environment's label, which
* is never null. Is null for native rules' RuleClass objects.
*/
@Nullable
@@ -2545,15 +2545,12 @@
return ruleDefinitionEnvironmentHashCode;
}
- /** Returns true if this RuleClass is a Skylark-defined RuleClass. */
+ /** Returns true if this RuleClass is a Starlark-defined RuleClass. */
public boolean isSkylark() {
return isSkylark;
}
- /**
- * Returns true if this RuleClass is Skylark-defined and is subject to analysis-time
- * tests.
- */
+ /** Returns true if this RuleClass is Starlark-defined and is subject to analysis-time tests. */
public boolean isSkylarkTestable() {
return skylarkTestable;
}
diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkDefinedAspect.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkDefinedAspect.java
index 310ed74..d9611d5 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkDefinedAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkDefinedAspect.java
@@ -30,7 +30,7 @@
import java.util.List;
import java.util.Objects;
-/** A Skylark value that is a result of an 'aspect(..)' function call. */
+/** A Starlark value that is a result of an 'aspect(..)' function call. */
@AutoCodec
public class SkylarkDefinedAspect implements SkylarkExportable, SkylarkAspect {
private final BaseFunction implementation;
diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeAspect.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeAspect.java
index ee5983c..d64e1ca 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeAspect.java
@@ -17,7 +17,7 @@
import com.google.common.collect.ImmutableSet;
import com.google.devtools.build.lib.syntax.Printer;
-/** A natively-defined aspect that is may be referenced by skylark attribute definitions. */
+/** A natively-defined aspect that is may be referenced by Starlark attribute definitions. */
public abstract class SkylarkNativeAspect extends NativeAspectClass implements SkylarkAspect {
@Override
public void repr(Printer printer) {
diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java
index bed4737..114f1c2 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkNativeModule.java
@@ -51,7 +51,7 @@
import java.util.TreeMap;
import javax.annotation.Nullable;
-/** The Skylark native module. */
+/** The Starlark native module. */
// TODO(cparsons): Move the definition of native.package() to this class.
public class SkylarkNativeModule implements SkylarkNativeModuleApi {
diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkProvider.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkProvider.java
index 74bb346..b18796d 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkProvider.java
@@ -31,7 +31,7 @@
import javax.annotation.Nullable;
/**
- * A provider defined in Skylark rather than in native code.
+ * A provider defined in Starlark rather than in native code.
*
* <p>This is a result of calling the {@code provider()} function from Skylark ({@link
* com.google.devtools.build.lib.analysis.skylark.SkylarkRuleClassFunctions#provider}).
diff --git a/src/main/java/com/google/devtools/build/lib/packages/SkylarkProviderIdentifier.java b/src/main/java/com/google/devtools/build/lib/packages/SkylarkProviderIdentifier.java
index ea94180..90012b8 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/SkylarkProviderIdentifier.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/SkylarkProviderIdentifier.java
@@ -21,7 +21,7 @@
import javax.annotation.Nullable;
/**
- * A wrapper around Skylark provider identifier, representing either a declared provider ({@see
+ * A wrapper around Starlark provider identifier, representing either a declared provider ({@see
* SkylarkProvider}) or a "legacy" string identifier.
*/
public final class SkylarkProviderIdentifier {
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Type.java b/src/main/java/com/google/devtools/build/lib/packages/Type.java
index 7295fcf..ec0f779 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Type.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Type.java
@@ -90,11 +90,11 @@
}
/**
- * Like {@link #convert(Object, Object, Object)}, but converts skylark {@code None}
- * to given {@code defaultValue}.
+ * Like {@link #convert(Object, Object, Object)}, but converts Starlark {@code None} to given
+ * {@code defaultValue}.
*/
- @Nullable public final T convertOptional(Object x,
- String what, @Nullable Object context, T defaultValue)
+ @Nullable
+ public final T convertOptional(Object x, String what, @Nullable Object context, T defaultValue)
throws ConversionException {
if (EvalUtils.isNullOrNone(x)) {
return defaultValue;
@@ -103,18 +103,20 @@
}
/**
- * Like {@link #convert(Object, Object, Object)}, but converts skylark {@code None}
- * to java {@code null}.
+ * Like {@link #convert(Object, Object, Object)}, but converts Starlark {@code None} to java
+ * {@code null}.
*/
- @Nullable public final T convertOptional(Object x, String what, @Nullable Object context)
+ @Nullable
+ public final T convertOptional(Object x, String what, @Nullable Object context)
throws ConversionException {
return convertOptional(x, what, context, null);
}
/**
- * Like {@link #convert(Object, Object)}, but converts skylark {@code NONE} to java {@code null}.
+ * Like {@link #convert(Object, Object)}, but converts Starlark {@code NONE} to java {@code null}.
*/
- @Nullable public final T convertOptional(Object x, String what) throws ConversionException {
+ @Nullable
+ public final T convertOptional(Object x, String what) throws ConversionException {
return convertOptional(x, what, null);
}
diff --git a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceGlobals.java b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceGlobals.java
index 9254578..9a5ae1c 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/WorkspaceGlobals.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/WorkspaceGlobals.java
@@ -46,7 +46,7 @@
import java.util.regex.Pattern;
import javax.annotation.Nullable;
-/** A collection of global skylark build API functions that apply to WORKSPACE files. */
+/** A collection of global Starlark build API functions that apply to WORKSPACE files. */
public class WorkspaceGlobals implements WorkspaceGlobalsApi {
// Must start with a letter and can contain letters, numbers, and underscores
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
index 052b62c..85c7490 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoConfiguration.java
@@ -35,7 +35,7 @@
/** Configuration for Protocol Buffer Libraries. */
@Immutable
-// This module needs to be exported to Skylark so it can be passed as a mandatory host/target
+// This module needs to be exported to Starlark so it can be passed as a mandatory host/target
// configuration fragment in aspect definitions.
public class ProtoConfiguration extends Fragment implements ProtoConfigurationApi {
/** Command line options. */
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
index 12f3358..373cac6 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommandEnvironment.java
@@ -593,7 +593,7 @@
/**
* Initializes the package cache using the given options, and syncs the package cache. Also
- * injects the skylark semantics using the options for the {@link
+ * injects the Starlark semantics using the options for the {@link
* com.google.devtools.build.lib.analysis.config.BuildConfiguration}.
*/
public void setupPackageCache(OptionsProvider options)
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
index d29edb6..8cc8c3e 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupFunction.java
@@ -41,7 +41,7 @@
/**
* A Skyframe function that reads, parses and validates the .bzl file denoted by a Label.
*
- * <p>Given a {@link Label} referencing a Skylark file, loads it as a syntax tree ({@link
+ * <p>Given a {@link Label} referencing a Starlark file, loads it as a syntax tree ({@link
* StarlarkFile}). The Label must be absolute, and must not reference the special {@code external}
* package. If the file (or the package containing it) doesn't exist, the function doesn't fail, but
* instead returns a specific {@code NO_FILE} {@link ASTFileLookupValue}.
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
index 9cf2607..3f22383 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/AspectValue.java
@@ -286,9 +286,7 @@
}
}
- /**
- * The key for a skylark aspect.
- */
+ /** The key for a Starlark aspect. */
public static class SkylarkAspectLoadingKey extends AspectValueKey {
private final Label targetLabel;
@@ -335,7 +333,7 @@
@Override
public String getDescription() {
- // Skylark aspects are referred to on command line with <file>%<value ame>
+ // Starlark aspects are referred to on command line with <file>%<value ame>
return String.format("%s%%%s of %s", skylarkFileLabel, skylarkValueName, targetLabel);
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
index eb639f8..2e9f565 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
@@ -604,7 +604,7 @@
transitiveRootCauses,
((ConfiguredRuleClassProvider) ruleClassProvider).getTrimmingTransitionFactory());
} catch (EvalException e) {
- // EvalException can only be thrown by computed Skylark attributes in the current rule.
+ // EvalException can only be thrown by computed Starlark attributes in the current rule.
env.getListener().handle(Event.error(e.getLocation(), e.getMessage()));
throw new DependencyEvaluationException(
new ConfiguredValueCreationException(
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkFileDependency.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkFileDependency.java
index 56d9a5c..405bae0 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkFileDependency.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkFileDependency.java
@@ -20,7 +20,7 @@
import java.util.Objects;
/**
- * A simple value class to store the direct Skylark file dependencies of a Skylark extension file.
+ * A simple value class to store the direct Starlark file dependencies of a Starlark extension file.
* It also contains a Label identifying the extension file.
*
* <p>The dependency structure must be acyclic.
@@ -37,16 +37,14 @@
}
/**
- * Returns the list of direct Skylark file dependencies of the Skylark extension file
+ * Returns the list of direct Starlark file dependencies of the Starlark extension file
* corresponding to this object.
*/
public ImmutableList<SkylarkFileDependency> getDependencies() {
return dependencies;
}
- /**
- * Returns the Label of the Skylark extension file corresponding to this object.
- */
+ /** Returns the Label of the Starlark extension file corresponding to this object. */
public Label getLabel() {
return label;
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java
index be9c828..1b2c0d0 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTraversalValue.java
@@ -71,7 +71,7 @@
if (errorMessage == null) {
if (target instanceof Rule && ((Rule) target).getRuleClassObject().isSkylark()) {
Rule rule = (Rule) target;
- // Do not intern values for skylark rules.
+ // Do not intern values for Starlark rules.
return TransitiveTraversalValue.create(
rule.getRuleClassObject().getAdvertisedProviders(), rule.getTargetKind(), errorMessage);
} else {
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/BUILD b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/BUILD
index 4eba0d8..95b9f55 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/BUILD
@@ -1,5 +1,5 @@
# Description:
-# This package contains interfaces representing the skylark "build API"
+# This package contains interfaces representing the Starlark "build API"
# (but not the implementation of that API). Ultimately, this package
# may be broken out of the Bazel package hierarchy to be standalone.
# Thus, this package should not depend on Bazel-specific packages (only
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkBuildApiGlobals.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkBuildApiGlobals.java
index 100211e..849ed4b 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkBuildApiGlobals.java
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/SkylarkBuildApiGlobals.java
@@ -20,9 +20,7 @@
import com.google.devtools.build.lib.syntax.EvalException;
import com.google.devtools.build.lib.syntax.StarlarkThread;
-/**
- * A collection of global skylark build API functions that belong in the global namespace.
- */
+/** A collection of global Starlark build API functions that belong in the global namespace. */
@SkylarkGlobalLibrary
public interface SkylarkBuildApiGlobals {
diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/python/BUILD b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/python/BUILD
index a611d41..e89e29c 100644
--- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/python/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/python/BUILD
@@ -1,5 +1,5 @@
# Description:
-# This package contains interfaces representing the skylark "build API"
+# This package contains interfaces representing the Starlark "build API"
# (but not the implementation of that API). Ultimately, this package
# may be broken out of the Bazel package hierarchy to be standalone.
# Thus, this package should not depend on Bazel-specific packages (only
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/CallUtils.java b/src/main/java/com/google/devtools/build/lib/syntax/CallUtils.java
index 3e91f80..b4918cd 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/CallUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/CallUtils.java
@@ -190,7 +190,7 @@
}
/**
- * Returns a set of the Skylark name of all Skylark callable methods for object of type {@code
+ * Returns a set of the Starlark name of all Starlark callable methods for object of type {@code
* objClass}.
*/
static ImmutableSet<String> getMethodNames(StarlarkSemantics semantics, Class<?> objClass) {
diff --git a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
index c7c8ae3..42e4313 100644
--- a/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/analysis/util/BuildViewTestCase.java
@@ -522,13 +522,12 @@
* Sets host and target configuration using the specified options, falling back to the default
* options for unspecified ones, and recreates the build view.
*
- * TODO(juliexxia): when skylark option parsing exists, find a way to combine these parameters
+ * <p>TODO(juliexxia): when Starlark option parsing exists, find a way to combine these parameters
* into a single parameter so skylark/native options don't have to be specified separately.
*
* @param skylarkOptions map of skylark-defined options where the keys are option names (in the
* form of label-like strings) and the values are option values
* @param args native option name/pair descriptions in command line form (e.g. "--cpu=k8")
- *
* @throws IllegalArgumentException
*/
protected void useConfiguration(ImmutableMap<String, Object> skylarkOptions, String... args)
@@ -668,11 +667,10 @@
}
/**
- * Creates and returns a rule context to use for Skylark tests that is equivalent to the one
- * that was used to create the given configured target.
+ * Creates and returns a rule context to use for Starlark tests that is equivalent to the one that
+ * was used to create the given configured target.
*/
- protected RuleContext getRuleContextForSkylark(ConfiguredTarget target)
- throws Exception {
+ protected RuleContext getRuleContextForSkylark(ConfiguredTarget target) throws Exception {
// TODO(bazel-team): we need this horrible workaround because CachingAnalysisEnvironment
// only works with StoredErrorEventListener despite the fact it accepts the interface
// ErrorEventListener, so it's not possible to create it with reporter.
@@ -1127,7 +1125,7 @@
*/
protected void checkLoadingPhaseError(String target, String expectedErrorMessage) {
reporter.removeHandler(failFastHandler);
- // The error happens during the loading of the Skylark file so checkError doesn't work here
+ // The error happens during the loading of the Starlark file so checkError doesn't work here
assertThrows(Exception.class, () -> getTarget(target));
assertContainsEvent(expectedErrorMessage);
}
diff --git a/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java b/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java
index 72db408..2cc5b39 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/java/JavaSkylarkApiTest.java
@@ -45,7 +45,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Tests Skylark API for Java rules. */
+/** Tests Starlark API for Java rules. */
@RunWith(JUnit4.class)
public class JavaSkylarkApiTest extends BuildViewTestCase {
private static final String HOST_JAVA_RUNTIME_LABEL =
@@ -432,7 +432,7 @@
*/
@Test
public void testJavaCommonCompileExposesAnnotationProcessingInfo() throws Exception {
- // Set up a Skylark rule that uses java_common.compile and supports annotation processing in
+ // Set up a Starlark rule that uses java_common.compile and supports annotation processing in
// the same way as java_library, then use a helper method to test that the custom rule produces
// the same annotation processing information as java_library would.
writeBuildFileForJavaToolchain();
diff --git a/src/test/java/com/google/devtools/build/lib/rules/java/proto/SkylarkJavaLiteProtoLibraryTest.java b/src/test/java/com/google/devtools/build/lib/rules/java/proto/SkylarkJavaLiteProtoLibraryTest.java
index a192d1a..ae297ba 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/java/proto/SkylarkJavaLiteProtoLibraryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/java/proto/SkylarkJavaLiteProtoLibraryTest.java
@@ -52,7 +52,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Tests for the Skylark version of java_lite_proto_library rule. */
+/** Tests for the Starlark version of java_lite_proto_library rule. */
@RunWith(JUnit4.class)
public class SkylarkJavaLiteProtoLibraryTest extends BuildViewTestCase {
private static final String RULE_DIRECTORY = "tools/build_rules/java_lite_proto_library";
@@ -265,7 +265,7 @@
@Test
@Ignore
- // TODO(elenairina): Enable this test when proguard specs are supported in the Skylark version of
+ // TODO(elenairina): Enable this test when proguard specs are supported in the Starlark version of
// java_lite_proto_library OR delete this if Proguard support will be removed from Java rules.
public void testExportsProguardSpecsForSupportLibraries() throws Exception {
scratch.overwriteFile(
@@ -323,7 +323,8 @@
}
/**
- * Verify that a java_lite_proto_library exposes Skylark providers for the Java code it generates.
+ * Verify that a java_lite_proto_library exposes Starlark providers for the Java code it
+ * generates.
*/
@Test
public void testJavaProtosExposeSkylarkProviders() throws Exception {
diff --git a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcSkylarkTest.java b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcSkylarkTest.java
index 1232a6b..b5540de 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcSkylarkTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/objc/ObjcSkylarkTest.java
@@ -40,9 +40,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/**
- * Tests for Skylark interaction with the objc_* rules.
- */
+/** Tests for Starlark interaction with the objc_* rules. */
@RunWith(JUnit4.class)
public class ObjcSkylarkTest extends ObjcRuleTestCase {
private void writeObjcSplitTransitionTestFiles() throws Exception {
diff --git a/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformInfoApiTest.java b/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformInfoApiTest.java
index 39dc909..48fab55 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformInfoApiTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformInfoApiTest.java
@@ -26,7 +26,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Tests Skylark API for {@link PlatformInfo} providers. */
+/** Tests Starlark API for {@link PlatformInfo} providers. */
@RunWith(JUnit4.class)
public class PlatformInfoApiTest extends PlatformTestCase {