Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record added node output states as new #61575

Merged
merged 1 commit into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ public void Modified_Entry_Adding_Outputs_Records_Added_Step_State()

values = ImmutableArray.Create(1, 2, 3);

// second time we'll see that the "Input" step is modified, but the outputs of the "SelectMany" step are modified.
// second time we'll see that the "Input" step is modified, but the outputs of the "SelectMany" step are new.
dstBuilder = GetBuilder(dstBuilder.ToImmutable(), trackIncrementalGeneratorSteps: true);
var table = dstBuilder.GetLatestStateTableForNode(transformNode);

Expand All @@ -971,7 +971,7 @@ public void Modified_Entry_Adding_Outputs_Records_Added_Step_State()

Assert.All(step.Outputs, output =>
{
Assert.Equal(IncrementalStepRunReason.Modified, output.Reason);
Assert.Equal(IncrementalStepRunReason.New, output.Reason);
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ private static IncrementalStepRunReason AsStepState(EntryState inputState, Entry
(EntryState.Cached, EntryState.Cached) => IncrementalStepRunReason.Cached,
(EntryState.Removed, EntryState.Removed) => IncrementalStepRunReason.Removed,
(EntryState.Modified, EntryState.Removed) => IncrementalStepRunReason.Removed,
(EntryState.Modified, EntryState.Added) => IncrementalStepRunReason.Modified,
(EntryState.Modified, EntryState.Added) => IncrementalStepRunReason.New,
_ => throw ExceptionUtilities.UnexpectedValue((inputState, outputState))
};
}
Expand Down