You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ChangeAwareList<T>.CaptureChanges() contains logic to consolidate separate remove changes together to form a Clear operation, if it detects that the collection is empty upon capture. This logic produces invalid changesets, under some circumstances.
Non-removal changes, such as Refresh that occurred since the last capture get ignored, which could arguably be a desirable behavior, since refreshing an item is pointless if it's soon-to-be removed. Personally, I think one could also argue this is an assumption we shouldn't make.
Items can appear in duplicate, within the produced Clear changeset, which I think is much more problematic. Downstream consumers that seek to actually inspect removed items, for post-processing, seem likely to rely on the the idea of only post-processing each item once.
Describe the bug 🐞
ChangeAwareList<T>.CaptureChanges()
contains logic to consolidate separate remove changes together to form aClear
operation, if it detects that the collection is empty upon capture. This logic produces invalid changesets, under some circumstances.Refresh
that occurred since the last capture get ignored, which could arguably be a desirable behavior, since refreshing an item is pointless if it's soon-to-be removed. Personally, I think one could also argue this is an assumption we shouldn't make.Clear
changeset, which I think is much more problematic. Downstream consumers that seek to actually inspect removed items, for post-processing, seem likely to rely on the the idea of only post-processing each item once.Step to reproduce
Here we can see that
result
does not include aRefresh
for item3
, and theClear
lists item3
twice.The text was updated successfully, but these errors were encountered: