Fixed
Status Update
Comments
ra...@google.com <ra...@google.com>
al...@google.com <al...@google.com>
sr...@google.com <sr...@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
sr...@google.com <sr...@google.com>
yo...@gmail.com <yo...@gmail.com> #3
yea i'll take it.
xa...@google.com <xa...@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.
il...@google.com <il...@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()
}
}
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #6
With 2.2.0-alpha04 (that use Main.immediate), the issue seems to be still there (I tested it by calling emitSource() twice, like your test case)
Description
Android Gradle Plugin: 3.3.0-alpha07
Gradle: 4.9
Load the arch components Gihub browser sample app
Actual:
With stable AGP versions (e.g. 3.1.2 or 3.1.4), it fails to sync and forces you to use AGP 3.3a7 .
Expected:
preview AS builds should sync with any AGP stable version from at least the last 12 months.