Skip to content

Commit

Permalink
Use ConfiguredTarget's embedded key to create TopLevelTargetBuiltEvent.
Browse files Browse the repository at this point in the history
This makes Skymeld consistent with how it it works in the non-Skymeld
SkyframeExecutor.buildArtifacts.

PiperOrigin-RevId: 536386104
Change-Id: Ic7127c0a6c67e3913ed5c1996392fa201813c90e
  • Loading branch information
aoeui authored and copybara-github committed May 30, 2023
1 parent 5575ff2 commit 73369ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.devtools.build.lib.actions.ActionExecutionStatusReporter;
import com.google.devtools.build.lib.actions.ActionLookupData;
import com.google.devtools.build.lib.actions.MiddlemanType;
import com.google.devtools.build.lib.analysis.ConfiguredTargetValue;
import com.google.devtools.build.lib.skyframe.ActionExecutionInactivityWatchdog;
import com.google.devtools.build.lib.skyframe.AspectCompletionValue;
import com.google.devtools.build.lib.skyframe.AspectKeyCreator;
Expand Down Expand Up @@ -155,7 +156,9 @@ public void evaluated(

eventBus.post(
TopLevelTargetBuiltEvent.create(
(ConfiguredTargetKey) buildDriverKey.getActionLookupKey()));
ConfiguredTargetKey.fromConfiguredTarget(
((ConfiguredTargetValue) buildDriverValue.getWrappedSkyValue())
.getConfiguredTarget())));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ public SkyValue compute(SkyKey skyKey, Environment env)
requestConfiguredTargetExecution(
configuredTarget,
buildDriverKey,
actionLookupKey,
buildConfigurationValue,
env,
topLevelArtifactContext,
Expand Down Expand Up @@ -446,7 +445,6 @@ private static Target getTarget(Environment env, Label label)
private void requestConfiguredTargetExecution(
ConfiguredTarget configuredTarget,
BuildDriverKey buildDriverKey,
ActionLookupKeyOrProxy actionLookupKey,
BuildConfigurationValue buildConfigurationValue,
Environment env,
TopLevelArtifactContext topLevelArtifactContext,
Expand All @@ -466,7 +464,9 @@ private void requestConfiguredTargetExecution(
Artifact.keys(artifactsToBuild.build()),
Collections.singletonList(
TargetCompletionValue.key(
(ConfiguredTargetKey) actionLookupKey, topLevelArtifactContext, false))));
ConfiguredTargetKey.fromConfiguredTarget(configuredTarget),
topLevelArtifactContext,
false))));
return;
}

Expand All @@ -486,9 +486,9 @@ private void requestConfiguredTargetExecution(
artifactsToBuild.build(),
Collections.singletonList(
TestCompletionValue.key(
(ConfiguredTargetKey) actionLookupKey,
ConfiguredTargetKey.fromConfiguredTarget(configuredTarget),
topLevelArtifactContext,
/*exclusiveTesting=*/ false))));
/* exclusiveTesting= */ false))));
return;
}

Expand Down

0 comments on commit 73369ae

Please sign in to comment.