Status Update
Comments
so...@google.com <so...@google.com>
ch...@google.com <ch...@google.com> #2
Note to self: the ListView
implementation does this as well, let's start there to see how this can be achieved.
ch...@google.com <ch...@google.com> #3
I think I just ran into this as well. I've got a loop that runs some code in a withFrameNanos
block, and then runs some code after it before the next iteration. That "after" code relies on layout invalidated by the withFrameNanos
block having been performed by the time it runs. This works perfectly in a real app, but in UI tests the loop runs to completion without layout being performed until the end. I almost want a awaitLayout()
function to make this dependency more explicit, although I think fixing this issue in tests should be enough. (More discussion in
ch...@google.com <ch...@google.com>
ap...@google.com <ap...@google.com> #4
One blocker for this is that currently the test infra uses an unconfined coroutine dispatcher, which makes it hard to ensure the ordering between withFrameNanos
calls and the resumption of the coroutines making them are ordered correctly. We might need to get off unconfined test dispatchers first:
Description
Compose options:
Updating a MutableState value in the backgroung, sometimes I get the following error:
Code to reproduce is attached. See
@Composable TestSnapshotCrash()
It's a simple layout with 3 Tabs and a LazyColumn. Changing the tab, a new list is created in the background and assigned to a mutablestate. That state is used in the lazycolumn. If you change the tab very quickly and many times, the crash should happen.