Fix some warnings on RuleContext
(Remove an unused field, and group method overloads together)
RELNOTES: None.
@@ -754,18 +754,6 @@ public final class RuleContext extends TargetContext
return result.build();
}
- /**
- * Returns the list of transitive info collections that feed into this target through the
- * specified attribute. Note that you need to specify the correct mode for the attribute,
- * otherwise an assertion will be raised.
- */
- public List<? extends TransitiveInfoCollection> getPrerequisites(String attributeName,
- Mode mode) {
- return Lists.transform(
- getPrerequisiteConfiguredTargetAndTargets(attributeName, mode),
- ConfiguredTargetAndData::getConfiguredTarget);
- }
-
/**
* Returns the prerequisites keyed by the CPU of their configurations. If the split transition
* is not active (e.g. split() returned an empty list), the key is an empty Optional.
@@ -958,6 +946,18 @@ public final class RuleContext extends TargetContext
return result.build();
}
+ /**
+ * Returns the list of transitive info collections that feed into this target through the
+ * specified attribute. Note that you need to specify the correct mode for the attribute,
+ * otherwise an assertion will be raised.
+ */
+ public List<? extends TransitiveInfoCollection> getPrerequisites(String attributeName,
+ Mode mode) {
+ return Lists.transform(
+ getPrerequisiteConfiguredTargetAndTargets(attributeName, mode),
+ ConfiguredTargetAndData::getConfiguredTarget);
+ }
+
/**
* Returns all the providers of the specified type that are listed under the specified attribute
* of this target in the BUILD file.
@@ -1444,7 +1444,6 @@ public final class RuleContext extends TargetContext
private ImmutableList<Aspect> aspects;
private ToolchainContext toolchainContext;
private ConstraintSemantics constraintSemantics;
- private ConfiguredTargetAndData associatedTarget;
@VisibleForTesting
public Builder(
