Search in sources :

Example 1 with AspectCompletionValue

use of com.google.devtools.build.lib.skyframe.AspectCompletionValue in project bazel by bazelbuild.

the class ExecutionProgressReceiver method evaluated.

@Override
public void evaluated(SkyKey skyKey, Supplier<SkyValue> skyValueSupplier, EvaluationState state) {
    SkyFunctionName type = skyKey.functionName();
    if (type.equals(SkyFunctions.TARGET_COMPLETION)) {
        TargetCompletionValue value = (TargetCompletionValue) skyValueSupplier.get();
        if (value == null) {
            return;
        }
        ConfiguredTarget target = value.getConfiguredTarget();
        builtTargets.add(target);
        if (testedTargets.contains(target)) {
            postTestTargetComplete(target);
        } else {
            postBuildTargetComplete(target);
        }
    } else if (type.equals(SkyFunctions.ASPECT_COMPLETION)) {
        AspectCompletionValue value = (AspectCompletionValue) skyValueSupplier.get();
        if (value != null) {
            AspectValue aspectValue = value.getAspectValue();
            ArtifactsToBuild artifacts = TopLevelArtifactHelper.getAllArtifactsToBuild(aspectValue, topLevelArtifactContext);
            eventBus.post(AspectCompleteEvent.createSuccessful(aspectValue, artifacts));
        }
    } else if (type.equals(SkyFunctions.ACTION_EXECUTION)) {
        // Remember all completed actions, even those in error, regardless of having been cached or
        // really executed.
        actionCompleted((Action) skyKey.argument());
    }
}
Also used : SkyFunctionName(com.google.devtools.build.skyframe.SkyFunctionName) AspectValue(com.google.devtools.build.lib.skyframe.AspectValue) AspectCompletionValue(com.google.devtools.build.lib.skyframe.AspectCompletionValue) ConfiguredTarget(com.google.devtools.build.lib.analysis.ConfiguredTarget) TargetCompletionValue(com.google.devtools.build.lib.skyframe.TargetCompletionValue) ArtifactsToBuild(com.google.devtools.build.lib.analysis.TopLevelArtifactHelper.ArtifactsToBuild)

Aggregations

ConfiguredTarget (com.google.devtools.build.lib.analysis.ConfiguredTarget)1 ArtifactsToBuild (com.google.devtools.build.lib.analysis.TopLevelArtifactHelper.ArtifactsToBuild)1 AspectCompletionValue (com.google.devtools.build.lib.skyframe.AspectCompletionValue)1 AspectValue (com.google.devtools.build.lib.skyframe.AspectValue)1 TargetCompletionValue (com.google.devtools.build.lib.skyframe.TargetCompletionValue)1 SkyFunctionName (com.google.devtools.build.skyframe.SkyFunctionName)1