Skip to content

Commit

Permalink
Split out SequencedSkyframeProgressReceiver
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 565750224
Change-Id: I705fc576cd0be9dff78557ba849fe3c33773e12e
  • Loading branch information
Googler authored and copybara-github committed Sep 15, 2023
1 parent 820ed9b commit 60d8f5a
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,18 @@ public RecordingDifferencer getDifferencerForTesting() {

@Override
protected SkyframeProgressReceiver newSkyframeProgressReceiver() {
return new SkyframeProgressReceiver() {
@Override
public void invalidated(SkyKey skyKey, InvalidationState state) {
super.invalidated(skyKey, state);
if (state == InvalidationState.DIRTY && skyKey instanceof FileValue.Key) {
incrementalBuildMonitor.reportInvalidatedFileValue();
}
return new SequencedSkyframeProgressReceiver();
}

/** A {@link SkyframeProgressReceiver} tracks dirty {@link FileValue.Key}s. */
protected class SequencedSkyframeProgressReceiver extends SkyframeProgressReceiver {
@Override
public void invalidated(SkyKey skyKey, InvalidationState state) {
super.invalidated(skyKey, state);
if (state == InvalidationState.DIRTY && skyKey instanceof FileValue.Key) {
incrementalBuildMonitor.reportInvalidatedFileValue();
}
};
}
}

@Nullable
Expand Down

0 comments on commit 60d8f5a

Please sign in to comment.