bazel packages: delete Info.getLocation
It was redundant w.r.t. getCreationLoc (now renamed getCreationLocation),
and required only by generated serialization code. The names of the
constructor parameters have been renamed creationLocation to match.
Subclasses of NativeInfo that always pass null or BUILTIN now
use the Location-less constructor. A follow-up CL may dematerialize
StructImpl.location and move getCreationLocation down to subclasses.
PiperOrigin-RevId: 341108644
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/TemplateVariableInfo.java b/src/main/java/com/google/devtools/build/lib/analysis/TemplateVariableInfo.java
index 6d0916d..4cf2572 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/TemplateVariableInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/TemplateVariableInfo.java
@@ -51,8 +51,8 @@
private final ImmutableMap<String, String> variables;
@AutoCodec.Instantiator
- public TemplateVariableInfo(ImmutableMap<String, String> variables, Location location) {
- super(location);
+ public TemplateVariableInfo(ImmutableMap<String, String> variables, Location creationLocation) {
+ super(creationLocation);
this.variables = variables;
}
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintSettingInfo.java b/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintSettingInfo.java
index abfb7b3..7b5df7f 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintSettingInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintSettingInfo.java
@@ -25,7 +25,6 @@
import com.google.devtools.build.lib.util.Fingerprint;
import javax.annotation.Nullable;
import net.starlark.java.eval.Printer;
-import net.starlark.java.syntax.Location;
/** Provider for a platform constraint setting that is available to be fulfilled. */
@Immutable
@@ -42,9 +41,7 @@
@Nullable private final Label defaultConstraintValueLabel;
@VisibleForSerialization
- ConstraintSettingInfo(Label label, Label defaultConstraintValueLabel, Location location) {
- super(location);
-
+ ConstraintSettingInfo(Label label, Label defaultConstraintValueLabel) {
this.label = label;
this.defaultConstraintValueLabel = defaultConstraintValueLabel;
}
@@ -105,18 +102,12 @@
/** Returns a new {@link ConstraintSettingInfo} with the given data. */
public static ConstraintSettingInfo create(Label constraintSetting) {
- return create(constraintSetting, null, Location.BUILTIN);
+ return create(constraintSetting, null);
}
/** Returns a new {@link ConstraintSettingInfo} with the given data. */
public static ConstraintSettingInfo create(
Label constraintSetting, Label defaultConstraintValue) {
- return create(constraintSetting, defaultConstraintValue, Location.BUILTIN);
- }
-
- /** Returns a new {@link ConstraintSettingInfo} with the given data. */
- public static ConstraintSettingInfo create(
- Label constraintSetting, Label defaultConstraintValue, Location location) {
- return new ConstraintSettingInfo(constraintSetting, defaultConstraintValue, location);
+ return new ConstraintSettingInfo(constraintSetting, defaultConstraintValue);
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintValueInfo.java b/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintValueInfo.java
index 012f7af..86c98de 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintValueInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/platform/ConstraintValueInfo.java
@@ -28,7 +28,6 @@
import com.google.devtools.build.lib.util.Fingerprint;
import java.util.Objects;
import net.starlark.java.eval.Printer;
-import net.starlark.java.syntax.Location;
/** Provider for a platform constraint value that fulfills a {@link ConstraintSettingInfo}. */
@Immutable
@@ -45,8 +44,7 @@
private final Label label;
@VisibleForSerialization
- ConstraintValueInfo(ConstraintSettingInfo constraint, Label label, Location location) {
- super(location);
+ ConstraintValueInfo(ConstraintSettingInfo constraint, Label label) {
this.constraint = constraint;
this.label = label;
}
@@ -102,13 +100,7 @@
/** Returns a new {@link ConstraintValueInfo} with the given data. */
public static ConstraintValueInfo create(ConstraintSettingInfo constraint, Label value) {
- return create(constraint, value, Location.BUILTIN);
- }
-
- /** Returns a new {@link ConstraintValueInfo} with the given data. */
- public static ConstraintValueInfo create(
- ConstraintSettingInfo constraint, Label value, Location location) {
- return new ConstraintValueInfo(constraint, value, location);
+ return new ConstraintValueInfo(constraint, value);
}
/** Add this constraint value to the given fingerprint. */
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformInfo.java b/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformInfo.java
index 64bf4ce..1c7ea56 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/platform/PlatformInfo.java
@@ -112,9 +112,8 @@
ConstraintCollection constraints,
String remoteExecutionProperties,
ImmutableMap<String, String> execProperties,
- Location location) {
- super(location);
-
+ Location creationLocation) {
+ super(creationLocation);
this.label = label;
this.constraints = constraints;
this.remoteExecutionProperties = Strings.nullToEmpty(remoteExecutionProperties);
@@ -173,7 +172,7 @@
private final ConstraintCollection.Builder constraints = ConstraintCollection.builder();
private String remoteExecutionProperties = null;
@Nullable private ImmutableMap<String, String> execProperties;
- private Location location = Location.BUILTIN;
+ private Location creationLocation = Location.BUILTIN;
/**
* Sets the parent {@link PlatformInfo} that this platform inherits from. Constraint values set
@@ -285,7 +284,7 @@
* @return the {@link Builder} instance for method chaining
*/
public Builder setLocation(Location location) {
- this.location = location;
+ this.creationLocation = location;
return this;
}
@@ -334,7 +333,7 @@
}
return new PlatformInfo(
- label, constraints.build(), remoteExecutionProperties, execProperties, location);
+ label, constraints.build(), remoteExecutionProperties, execProperties, creationLocation);
}
private static String mergeRemoteExecutionProperties(
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/platform/ToolchainTypeInfo.java b/src/main/java/com/google/devtools/build/lib/analysis/platform/ToolchainTypeInfo.java
index 82d23ef..c4efa25 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/platform/ToolchainTypeInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/platform/ToolchainTypeInfo.java
@@ -23,7 +23,6 @@
import com.google.devtools.build.lib.starlarkbuildapi.platform.ToolchainTypeInfoApi;
import java.util.Objects;
import net.starlark.java.eval.Printer;
-import net.starlark.java.syntax.Location;
/** A provider that supplies information about a specific toolchain type. */
@Immutable
@@ -38,17 +37,12 @@
private final Label typeLabel;
- public static ToolchainTypeInfo create(Label typeLabel, Location location) {
- return new ToolchainTypeInfo(typeLabel, location);
- }
-
public static ToolchainTypeInfo create(Label typeLabel) {
- return create(typeLabel, Location.BUILTIN);
+ return new ToolchainTypeInfo(typeLabel);
}
@VisibleForSerialization
- ToolchainTypeInfo(Label typeLabel, Location location) {
- super(location);
+ ToolchainTypeInfo(Label typeLabel) {
this.typeLabel = typeLabel;
}
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleConfiguredTargetUtil.java b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleConfiguredTargetUtil.java
index 3d1cf1a..f3cab79 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleConfiguredTargetUtil.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/starlark/StarlarkRuleConfiguredTargetUtil.java
@@ -222,7 +222,7 @@
if (ex.getDeprecatedLocation() == null) {
// Prefer target struct's creation location in error messages.
if (target instanceof Info) {
- loc = ((Info) target).getCreationLoc();
+ loc = ((Info) target).getCreationLocation();
}
ex = new EvalException(loc, ex.getMessage());
}
@@ -299,7 +299,7 @@
// Either an old-style struct or a single declared provider (not in a list)
Info info = (Info) target;
// Use the creation location of this struct as a better reference in error messages
- loc = info.getCreationLoc();
+ loc = info.getCreationLocation();
if (getProviderKey(loc, info).equals(StructProvider.STRUCT.getKey())) {
if (context
@@ -479,7 +479,7 @@
Runfiles defaultRunfiles = null;
Artifact executable = null;
- Location loc = provider.getCreationLoc();
+ Location loc = provider.getCreationLocation();
if (getProviderKey(loc, provider).equals(DefaultInfo.PROVIDER.getKey())) {
DefaultInfo defaultInfo = (DefaultInfo) provider;
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Info.java b/src/main/java/com/google/devtools/build/lib/packages/Info.java
index 5eb2527..c009f85 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Info.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Info.java
@@ -60,20 +60,10 @@
* Returns the source location where this Info (provider instance) was created, or BUILTIN if it
* was instantiated by Java code.
*/
- default Location getCreationLoc() {
+ default Location getCreationLocation() {
return Location.BUILTIN;
}
- /**
- * This method (which is redundant with getCreationLoc and should not be overridden or called) is
- * required to pacify the AutoCodec annotation processor.
- */
- // TODO(adonovan): find out why and stop it.
- // Alternatively rename various constructor parameters from 'location' to 'creationLoc'.
- default Location getLocation() {
- return getCreationLoc();
- }
-
@Override
default void repr(Printer printer) {
printer.append("<instance of provider ");
diff --git a/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java b/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java
index 5f15113..dbcb24f 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/StructImpl.java
@@ -60,7 +60,7 @@
}
@Override
- public Location getCreationLoc() {
+ public Location getCreationLocation() {
return location;
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcModule.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcModule.java
index 9ecacc9..3ee5e21 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcModule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcModule.java
@@ -1043,7 +1043,7 @@
}
if (!type.equals(provider.getValue("type_name"))) {
throw new EvalException(
- provider.getCreationLoc(),
+ provider.getCreationLocation(),
String.format("Expected object of type '%s', received '%s'.", type, providerType));
}
}
@@ -1065,13 +1065,13 @@
getMandatoryFieldFromStarlarkProvider(featureStruct, "enabled", Boolean.class);
if (name == null || (name.isEmpty() && !enabled)) {
throw new EvalException(
- featureStruct.getCreationLoc(),
+ featureStruct.getCreationLocation(),
"A feature must either have a nonempty 'name' field or be enabled.");
}
if (!name.matches("^[_a-z0-9+\\-\\.]*$")) {
throw new EvalException(
- featureStruct.getCreationLoc(),
+ featureStruct.getCreationLocation(),
String.format(
"A feature's name must consist solely of lowercase ASCII letters, digits, '.', "
+ "'_', '+', and '-', got '%s'",
@@ -1085,7 +1085,7 @@
FlagSet flagSet = flagSetFromStarlark(flagSetObject, /* actionName= */ null);
if (flagSet.getActions().isEmpty()) {
throw new EvalException(
- flagSetObject.getCreationLoc(),
+ flagSetObject.getCreationLocation(),
"A flag_set that belongs to a feature must have nonempty 'actions' parameter.");
}
flagSetBuilder.add(flagSet);
@@ -1105,7 +1105,7 @@
for (StarlarkInfo featureSetStruct : requires) {
if (!"feature_set".equals(featureSetStruct.getValue("type_name"))) { // getValue() may be null
throw new EvalException(
- featureStruct.getCreationLoc(), "expected object of type 'feature_set'.");
+ featureStruct.getCreationLocation(), "expected object of type 'feature_set'.");
}
ImmutableSet<String> featureSet =
getStringSetFromStarlarkProviderField(featureSetStruct, "features");
@@ -1141,12 +1141,12 @@
String value = getMandatoryFieldFromStarlarkProvider(makeVariableStruct, "value", String.class);
if (name == null || name.isEmpty()) {
throw new EvalException(
- makeVariableStruct.getCreationLoc(),
+ makeVariableStruct.getCreationLocation(),
"'name' parameter of make_variable must be a nonempty string.");
}
if (value == null || value.isEmpty()) {
throw new EvalException(
- makeVariableStruct.getCreationLoc(),
+ makeVariableStruct.getCreationLocation(),
"'value' parameter of make_variable must be a nonempty string.");
}
return Pair.of(name, value);
@@ -1165,12 +1165,12 @@
String path = getMandatoryFieldFromStarlarkProvider(toolPathStruct, "path", String.class);
if (name == null || name.isEmpty()) {
throw new EvalException(
- toolPathStruct.getCreationLoc(),
+ toolPathStruct.getCreationLocation(),
"'name' parameter of tool_path must be a nonempty string.");
}
if (path == null || path.isEmpty()) {
throw new EvalException(
- toolPathStruct.getCreationLoc(),
+ toolPathStruct.getCreationLocation(),
"'path' parameter of tool_path must be a nonempty string.");
}
return Pair.of(name, path);
@@ -1187,12 +1187,12 @@
getMandatoryFieldFromStarlarkProvider(variableWithValueStruct, "value", String.class);
if (name == null || name.isEmpty()) {
throw new EvalException(
- variableWithValueStruct.getCreationLoc(),
+ variableWithValueStruct.getCreationLocation(),
"'name' parameter of variable_with_value must be a nonempty string.");
}
if (value == null || value.isEmpty()) {
throw new EvalException(
- variableWithValueStruct.getCreationLoc(),
+ variableWithValueStruct.getCreationLocation(),
"'value' parameter of variable_with_value must be a nonempty string.");
}
return new VariableWithValue(name, value);
@@ -1206,12 +1206,12 @@
String value = getMandatoryFieldFromStarlarkProvider(envEntryStruct, "value", String.class);
if (key == null || key.isEmpty()) {
throw new EvalException(
- envEntryStruct.getCreationLoc(),
+ envEntryStruct.getCreationLocation(),
"'key' parameter of env_entry must be a nonempty string.");
}
if (value == null || value.isEmpty()) {
throw new EvalException(
- envEntryStruct.getCreationLoc(),
+ envEntryStruct.getCreationLocation(),
"'value' parameter of env_entry must be a nonempty string.");
}
StringValueParser parser = new StringValueParser(value);
@@ -1237,7 +1237,8 @@
ImmutableSet<String> actions = getStringSetFromStarlarkProviderField(envSetStruct, "actions");
if (actions.isEmpty()) {
throw new EvalException(
- envSetStruct.getCreationLoc(), "actions parameter of env_set must be a nonempty list.");
+ envSetStruct.getCreationLocation(),
+ "actions parameter of env_set must be a nonempty list.");
}
ImmutableList.Builder<EnvEntry> envEntryBuilder = ImmutableList.builder();
ImmutableList<StarlarkInfo> envEntryStructs =
@@ -1275,13 +1276,13 @@
if (flagGroups.size() > 0 && flags.size() > 0) {
throw new EvalException(
- flagGroupStruct.getCreationLoc(),
+ flagGroupStruct.getCreationLocation(),
"flag_group must contain either a list of flags or a list of flag_groups.");
}
if (flagGroups.size() == 0 && flags.size() == 0) {
throw new EvalException(
- flagGroupStruct.getCreationLoc(), "Both 'flags' and 'flag_groups' are empty.");
+ flagGroupStruct.getCreationLocation(), "Both 'flags' and 'flag_groups' are empty.");
}
String iterateOver =
@@ -1360,13 +1361,15 @@
if (toolPathString != null) {
if (toolArtifact != null) {
throw new EvalException(
- toolStruct.getCreationLoc(), "\"tool\" and \"path\" cannot be set at the same time.");
+ toolStruct.getCreationLocation(),
+ "\"tool\" and \"path\" cannot be set at the same time.");
}
toolPath = PathFragment.create(toolPathString);
if (toolPath.isEmpty()) {
throw new EvalException(
- toolStruct.getCreationLoc(), "The 'path' field of tool must be a nonempty string.");
+ toolStruct.getCreationLocation(),
+ "The 'path' field of tool must be a nonempty string.");
}
if (toolPath.isAbsolute()) {
@@ -1404,12 +1407,12 @@
getMandatoryFieldFromStarlarkProvider(actionConfigStruct, "action_name", String.class);
if (actionName == null || actionName.isEmpty()) {
throw new EvalException(
- actionConfigStruct.getCreationLoc(),
+ actionConfigStruct.getCreationLocation(),
"The 'action_name' field of action_config must be a nonempty string.");
}
if (!actionName.matches("^[_a-z0-9+\\-\\.]*$")) {
throw new EvalException(
- actionConfigStruct.getCreationLoc(),
+ actionConfigStruct.getCreationLocation(),
String.format(
"An action_config's name must consist solely of lowercase ASCII letters, digits, "
+ "'.', '_', '+', and '-', got '%s'",
@@ -1450,7 +1453,7 @@
artifactNamePatternStruct, "category_name", String.class);
if (categoryName == null || categoryName.isEmpty()) {
throw new EvalException(
- artifactNamePatternStruct.getCreationLoc(),
+ artifactNamePatternStruct.getCreationLocation(),
"The 'category_name' field of artifact_name_pattern must be a nonempty string.");
}
ArtifactCategory foundCategory = null;
@@ -1462,7 +1465,7 @@
if (foundCategory == null) {
throw new EvalException(
- artifactNamePatternStruct.getCreationLoc(),
+ artifactNamePatternStruct.getCreationLocation(),
String.format("Artifact category %s not recognized.", categoryName));
}
@@ -1472,7 +1475,7 @@
artifactNamePatternStruct, "extension", String.class));
if (!foundCategory.getAllowedExtensions().contains(extension)) {
throw new EvalException(
- artifactNamePatternStruct.getCreationLoc(),
+ artifactNamePatternStruct.getCreationLocation(),
String.format(
"Unrecognized file extension '%s', allowed extensions are %s,"
+ " please check artifact_name_pattern configuration for %s in your rule.",
@@ -1505,7 +1508,8 @@
if (obj == null) {
if (mandatory) {
throw new EvalException(
- provider.getCreationLoc(), String.format("Missing mandatory field '%s'", fieldName));
+ provider.getCreationLocation(),
+ String.format("Missing mandatory field '%s'", fieldName));
}
return null;
}
@@ -1516,7 +1520,7 @@
return null;
}
throw new EvalException(
- provider.getCreationLoc(),
+ provider.getCreationLocation(),
String.format("Field '%s' is not of '%s' type.", fieldName, clazz.getName()));
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java b/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java
index 443f33c..cfe3e2a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/BootClassPathInfo.java
@@ -117,8 +117,8 @@
NestedSet<Artifact> bootclasspath,
NestedSet<Artifact> auxiliary,
Artifact system,
- Location location) {
- super(location);
+ Location creationLocation) {
+ super(creationLocation);
this.bootclasspath = bootclasspath;
this.auxiliary = auxiliary;
this.system = system;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfo.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfo.java
index a1bfd01..6217b82 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaInfo.java
@@ -260,8 +260,8 @@
NestedSet<Artifact> transitiveOnlyRuntimeJars,
boolean neverlink,
ImmutableList<String> javaConstraints,
- Location location) {
- super(location);
+ Location creationLocation) {
+ super(creationLocation);
this.directRuntimeJars = directRuntimeJars;
this.transitiveOnlyRuntimeJars = transitiveOnlyRuntimeJars;
this.providers = providers;
@@ -484,7 +484,7 @@
private final NestedSetBuilder<Artifact> transitiveOnlyRuntimeJars =
new NestedSetBuilder<>(Order.STABLE_ORDER);
private boolean neverlink;
- private Location location = Location.BUILTIN;
+ private Location creationLocation = Location.BUILTIN;
private Builder(TransitiveInfoProviderMapBuilder providerMap) {
this.providerMap = providerMap;
@@ -502,7 +502,7 @@
.addTransitiveOnlyRuntimeJars(javaInfo.getTransitiveOnlyRuntimeJars())
.setNeverlink(javaInfo.isNeverlink())
.setJavaConstraints(javaInfo.getJavaConstraints())
- .setLocation(javaInfo.getCreationLoc());
+ .setLocation(javaInfo.getCreationLocation());
}
public Builder setRuntimeJars(ImmutableList<Artifact> runtimeJars) {
@@ -560,7 +560,7 @@
}
public Builder setLocation(Location location) {
- this.location = location;
+ this.creationLocation = location;
return this;
}
@@ -588,7 +588,7 @@
transitiveOnlyRuntimeJars.build(),
neverlink,
javaConstraints,
- location);
+ creationLocation);
}
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/MessageBundleInfo.java b/src/main/java/com/google/devtools/build/lib/rules/java/MessageBundleInfo.java
index 3e17d0c..d7ac78d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/MessageBundleInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/MessageBundleInfo.java
@@ -76,8 +76,8 @@
@VisibleForSerialization
@AutoCodec.Instantiator
- MessageBundleInfo(ImmutableList<Artifact> messages, Location location) {
- super(location);
+ MessageBundleInfo(ImmutableList<Artifact> messages, Location creationLocation) {
+ super(creationLocation);
this.messages = Preconditions.checkNotNull(messages);
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java
index 239f9bb..e433dc4 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java
@@ -33,7 +33,6 @@
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.PathFragment;
import javax.annotation.Nullable;
-import net.starlark.java.syntax.Location;
/**
* Utility functions for proto_library and proto aspect implementations.
@@ -469,8 +468,7 @@
exportedProtos,
exportedProtoSourceRoots,
directDescriptorSet,
- transitiveDescriptorSets,
- Location.BUILTIN);
+ transitiveDescriptorSets);
return protoInfo;
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoInfo.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoInfo.java
index 359b4a3..bb7b575 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoInfo.java
@@ -26,7 +26,6 @@
import com.google.devtools.build.lib.starlarkbuildapi.proto.ProtoBootstrap;
import com.google.devtools.build.lib.util.Pair;
import javax.annotation.Nullable;
-import net.starlark.java.syntax.Location;
/**
* Configured target classes that implement this class can contribute .proto files to the
@@ -76,9 +75,7 @@
NestedSet<Pair<Artifact, String>> exportedProtoSourcesImportPaths,
NestedSet<String> exportedProtoSourceRoots,
Artifact directDescriptorSet,
- NestedSet<Artifact> transitiveDescriptorSets,
- Location location) {
- super(location);
+ NestedSet<Artifact> transitiveDescriptorSets) {
this.directProtoSources = directProtoSources;
this.originalDirectProtoSources = originalDirectProtoSources;
this.directProtoSourceRoot = directProtoSourceRoot;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyInfo.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyInfo.java
index e1824ab..462a591 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/python/PyInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyInfo.java
@@ -103,7 +103,7 @@
}
@Override
- public Location getCreationLoc() {
+ public Location getCreationLocation() {
return location;
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyRuntimeInfo.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyRuntimeInfo.java
index 1e816e3..13c6228 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/python/PyRuntimeInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyRuntimeInfo.java
@@ -81,7 +81,7 @@
}
@Override
- public Location getCreationLoc() {
+ public Location getCreationLocation() {
return location;
}