Refactor SkyframeExecutor to allow computing universal key through static method
RELNOTES: None
@@ -600,8 +600,12 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
progressReceiver = newSkyframeProgressReceiver();
ImmutableMap<SkyFunctionName, SkyFunction> skyFunctions =
skyFunctions(pkgFactory, allowedMissingInputs);
- memoizingEvaluator = evaluatorSupplier.create(
- skyFunctions, evaluatorDiffer(), progressReceiver, emittedEventState,
+ memoizingEvaluator =
+ evaluatorSupplier.create(
+ skyFunctions,
+ evaluatorDiffer(),
+ progressReceiver,
+ emittedEventState,
hasIncrementalState());
buildDriver = getBuildDriver();
}
@@ -1774,6 +1778,11 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
@Override
public SkyKey getUniverseKey(Collection<String> patterns, String offset) {
+ return computeUniverseKey(ImmutableList.copyOf(patterns), offset);
+ }
+
+ /** Computes the {@link SkyKey} that defines this universe. */
+ public static SkyKey computeUniverseKey(Collection<String> patterns, String offset) {
return PrepareDepsOfPatternsValue.key(ImmutableList.copyOf(patterns), offset);
}
