Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Yigit, do you have time to fix it?
reemission of the same liveData is racy
reemission of the same liveData is racy
ap...@google.com <ap...@google.com> #3
yea i'll take it.
ma...@google.com <ma...@google.com>
ch...@google.com <ch...@google.com> #4
Thanks for the detailed analysis. This may not be an issue anymore since we've started using Main.immediate there but I' not sure; I'll try to create a test case.
ma...@google.com <ma...@google.com>
pr...@google.com <pr...@google.com> #5
just emitting same live data reproduces the issue.
@Test
fun raceTest() {
val subLiveData = MutableLiveData(1)
val subject = liveData(testScope.coroutineContext) {
emitSource(subLiveData)
emitSource(subLiveData) //crashes
}
subject.addObserver().apply {
testScope.advanceUntilIdle()
}
}
@Test
fun raceTest() {
val subLiveData = MutableLiveData(1)
val subject = liveData(testScope.coroutineContext) {
emitSource(subLiveData)
emitSource(subLiveData) //crashes
}
subject.addObserver().apply {
testScope.advanceUntilIdle()
}
}
Description
Due to b/309858620 we need a workaround for library profiles in pre agp 8.3.0-alpha15.
When not meeting min agp version, for libraries we can only always merge the profile for all build type and flavors and output it in
src/main/baseline-prof.txt
.