Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable automatic async conversion for IGListAdapter APIs
Summary: Threads has now run into multiple instances of device-only crashes resulting from usage of automatically converted Swift async versions of `performUpdates(animated:)` and `reloadData()`. See D64428846, D64876801. The crashes appear to stem from the opaque, automatically generated async methodology: ``` objc completion handler block implementation for escaping callee_unowned convention(block) (unowned Bool) -> () with result type Bool ``` Our `IGListKit` infra assuming ownership of these `callee_unowned` blocks seems to be problematic: the block can be released/nil'd, and our downstream [`[-[IGListReloadTransaction _executeCompletionBlocks:]`](https://www.internalfb.com/intern/logview/redirect/?filename=IGListReloadTransaction.m&line=82&repo=fbsource&revision=c1e4b4a34ff90e4785983b260f10543af6536215&build=655525612) execution then crashes. Given this incompatibility with automatic conversion, here I propose: 1. marking the relevant `IGListAdapter.h` APIs with `NS_SWIFT_DISABLE_ASYNC` 2. providing manual async APIs in a new `IGListAdapter+Async.swift` extension hosted in `IGListSwiftKit` that existing callers can now make use of. Differential Revision: D64881920 fbshipit-source-id: b15a5141a79491c1871b92f4f84a0c29b6045ee0
- Loading branch information