IGListKit/Source/IGListDiffKit
Maxime Ollivier 5e79f8a319 add IGListExperimentThrowOnInconsistencyException
Summary:
Currently, we don't throw on `NSInternalInconsistencyException` as a temporary workaround, but there's a few issues with that:
1) `IGFailure` doesn't collect nearly as much information as exceptions, so it's difficult to debug. We could add more context to it, but feels like we should just fix the underlying issue instead, and remove the workaround.
2) If we throw in an animated update, all app animations break because `[UIView performWithoutAnimation:...]` doesn’t close properly.
3) Continuing to use the `UICollectionView` after it throws feels a bit risky IMO. There's no guarantee that it should work properly after that.

Lets reintroduce the exception slowly, fix each problem, and eventually remove the workaround.

In the future, we could do 2 other things:
1) Make `IGListExceptionDoctor` that can look at an exception's details and diagnose the issue, or at least provide more context.
2) Check if the updates make sense before telling the `UICollectionView`, so we can fallback to a `-reloadData`. This would shift the problem from a crash to a performance regression, so not ideal, but maybe less worse for production.

I'll add the experiment set-up in the next diffs.

Differential Revision: D50426255

fbshipit-source-id: 26e21d3dfcf4670ed07f397cf0d4decdda08eec5
2023-10-19 09:57:48 -07:00
..
Internal Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListAssert.h Fix IGWarnAssert macro to remove unneeded condition parameter 2023-09-26 08:22:26 -07:00
IGListBatchUpdateData.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListBatchUpdateData.mm Fix unsigned integer overflow (#1299) 2023-05-02 02:23:55 -07:00
IGListCompatibility.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiff.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiff.mm Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffable.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListDiffKit.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListExperiments.h add IGListExperimentThrowOnInconsistencyException 2023-10-19 09:57:48 -07:00
IGListIndexPathResult.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListIndexPathResult.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListIndexSetResult.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListIndexSetResult.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMacros.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndex.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndex.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndexPath.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
IGListMoveIndexPath.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSNumber+IGListDiffable.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSNumber+IGListDiffable.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSString+IGListDiffable.h Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00
NSString+IGListDiffable.m Standarize the copyright notice in all source files 2023-04-06 02:44:16 -07:00