bazel syntax: delete Environment.getCallerLabel
The calls to it were removed in
@@ -814,13 +814,6 @@ public final class Environment implements Freezable {
*/
@Nullable private Continuation continuation;
- /**
- * Gets the label of the BUILD file that is using this environment. For example, if a target //foo
- * has a dependency on //bar which is a Skylark rule defined in //rules:my_rule.bzl being
- * evaluated in this environment, then this would return //foo.
- */
- @Nullable private final Label callerLabel;
-
/**
* Enters a scope by saving state to a new Continuation
*
@@ -919,7 +912,6 @@ public final class Environment implements Freezable {
* @param eventHandler an EventHandler for warnings, errors, etc
* @param importedExtensions Extension-s from which to import bindings with load()
* @param fileContentHashCode a hash for the source file being evaluated, if any
- * @param callerLabel the label this environment came from
*/
private Environment(
GlobalFrame globalFrame,
@@ -927,8 +919,7 @@ public final class Environment implements Freezable {
StarlarkContext starlarkContext,
EventHandler eventHandler,
Map<String, Extension> importedExtensions,
- @Nullable String fileContentHashCode,
- @Nullable Label callerLabel) {
+ @Nullable String fileContentHashCode) {
this.lexicalFrame = Preconditions.checkNotNull(globalFrame);
this.globalFrame = Preconditions.checkNotNull(globalFrame);
this.mutability = globalFrame.mutability();
@@ -937,7 +928,6 @@ public final class Environment implements Freezable {
this.starlarkContext = starlarkContext;
this.eventHandler = eventHandler;
this.importedExtensions = importedExtensions;
- this.callerLabel = callerLabel;
this.transitiveHashCode =
computeTransitiveContentHashCode(fileContentHashCode, importedExtensions);
}
@@ -956,7 +946,6 @@ public final class Environment implements Freezable {
@Nullable private EventHandler eventHandler;
@Nullable private Map<String, Extension> importedExtensions;
@Nullable private String fileContentHashCode;
- private Label label;
Builder(Mutability mutability) {
this.mutability = mutability;
@@ -1053,13 +1042,7 @@ public final class Environment implements Freezable {
starlarkContext,
eventHandler,
importedExtensions,
- fileContentHashCode,
- label);
- }
-
- public Builder setCallerLabel(Label label) {
- this.label = label;
- return this;
+ fileContentHashCode);
}
}
@@ -1067,11 +1050,6 @@ public final class Environment implements Freezable {
return new Builder(mutability);
}
- /** Returns the caller's label. */
- public Label getCallerLabel() {
- return callerLabel;
- }
-
/** Remove variable from local bindings. */
void removeLocalBinding(String varname) {
try {
