diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java index a13278fde8..6c02c4f549 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java @@ -183,7 +183,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { private final MemoizingEvaluator.EmittedEventState emittedEventState = new MemoizingEvaluator.EmittedEventState(); private final PackageFactory pkgFactory; - private final Factory workspaceStatusActionFactory; + private final WorkspaceStatusAction.Factory workspaceStatusActionFactory; private final BlazeDirectories directories; protected final ExternalFilesHelper externalFilesHelper; @Nullable protected OutputService outputService; @@ -205,8 +205,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { // package twice (first time loading to find subincludes and declare value dependencies). // TODO(bazel-team): remove this cache once we have skyframe-native package loading // [skyframe-loading] - private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<Builder>> packageFunctionCache = - newPkgFunctionCache(); + private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.Builder>> + packageFunctionCache = newPkgFunctionCache(); private final Cache<PackageIdentifier, CacheEntryWithGlobDeps<AstAfterPreprocessing>> astCache = newAstCache(); @@ -215,9 +215,6 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { protected SkyframeBuildView skyframeBuildView; private ActionLogBufferPathGenerator actionLogBufferPathGenerator; - private final java.util.function.Supplier<ActionLogBufferPathGenerator> - actionLogBufferPathGeneratorSupplier = - () -> Preconditions.checkNotNull(actionLogBufferPathGenerator); protected BuildDriver buildDriver; @@ -772,7 +769,8 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { } } - protected Cache<PackageIdentifier, CacheEntryWithGlobDeps<Builder>> newPkgFunctionCache() { + protected Cache<PackageIdentifier, CacheEntryWithGlobDeps<Package.Builder>> + newPkgFunctionCache() { return CacheBuilder.newBuilder().build(); } @@ -885,11 +883,6 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { return skyframeActionExecutor; } - public java.util.function.Supplier<ActionLogBufferPathGenerator> - getActionLogBufferPathGeneratorSupplier() { - return actionLogBufferPathGeneratorSupplier; - } - @VisibleForTesting ImmutableList<Path> getPathEntries() { return pkgLocator.get().getPathEntries(); @@ -936,7 +929,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { Set<SkyKey> valuesToInvalidate = new HashSet<>(); Map<SkyKey, SkyValue> valuesToInject = new HashMap<>(); - for (Entry<SkyKey, Delta> entry : diff.changedKeysWithNewAndOldValues().entrySet()) { + for (Map.Entry<SkyKey, Delta> entry : diff.changedKeysWithNewAndOldValues().entrySet()) { SkyKey key = entry.getKey(); Preconditions.checkState(key.functionName().equals(SkyFunctions.FILE_STATE), key); RootedPath rootedPath = (RootedPath) key.argument(); @@ -1114,11 +1107,10 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { Attribute.Transition dataTransition = ((ConfiguredRuleClassProvider) ruleClassProvider) .getDynamicTransitionMapper() - .map(ConfigurationTransition.DATA); - BuildOptions dataOptions = - dataTransition != ConfigurationTransition.NONE - ? ((PatchTransition) dataTransition).apply(firstTargetConfig.getOptions()) - : firstTargetConfig.getOptions(); + .map(Attribute.ConfigurationTransition.DATA); + BuildOptions dataOptions = dataTransition != Attribute.ConfigurationTransition.NONE + ? ((PatchTransition) dataTransition).apply(firstTargetConfig.getOptions()) + : firstTargetConfig.getOptions(); BuildOptions hostOptions = dataOptions.get(BuildConfiguration.Options.class).useDistinctHostConfiguration @@ -1313,7 +1305,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { } EvaluationResult<SkyValue> result = evaluateSkyKeys(eventHandler, skyKeys); - for (Entry<SkyKey, ErrorInfo> entry : result.errorMap().entrySet()) { + for (Map.Entry<SkyKey, ErrorInfo> entry : result.errorMap().entrySet()) { reportCycles(eventHandler, entry.getValue().getCycleInfo(), entry.getKey()); } @@ -1399,7 +1391,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { EvaluationResult<SkyValue> evalResult = evaluateSkyKeys(eventHandler, configSkyKeys, keepGoing); if (evalResult.hasError()) { - Entry<SkyKey, ErrorInfo> firstError = Iterables.get(evalResult.errorMap().entrySet(), 0); + Map.Entry<SkyKey, ErrorInfo> firstError = Iterables.get(evalResult.errorMap().entrySet(), 0); ErrorInfo error = firstError.getValue(); Throwable e = error.getException(); // Wrap loading failed exceptions @@ -1458,7 +1450,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { } EvaluationResult<SkyValue> fragmentsResult = evaluateSkyKeys( eventHandler, transitiveFragmentSkyKeys, /*keepGoing=*/true); - for (Entry<SkyKey, ErrorInfo> entry : fragmentsResult.errorMap().entrySet()) { + for (Map.Entry<SkyKey, ErrorInfo> entry : fragmentsResult.errorMap().entrySet()) { reportCycles(eventHandler, entry.getValue().getCycleInfo(), entry.getKey()); } for (Dependency key : keys) { @@ -1856,7 +1848,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory { } @VisibleForTesting - public Builder.Helper getPackageBuilderHelperForTesting() { + public Package.Builder.Helper getPackageBuilderHelperForTesting() { return pkgFactory.getPackageBuilderHelperForTesting(); } |