Fixed
Status Update
Comments
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
ap...@google.com <ap...@google.com> #3
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically ( b/140759491 ).
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
https://android-review.googlesource.com/1288456
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
da...@google.com <da...@google.com> #5
Made some progress but we still need to migrate: AutoCloser and MultiInstanceInvalidation.
We are unlikely to ever migrate room-rxjava nor room-guava extensions.
ae...@gmail.com <ae...@gmail.com> #6
Good. Continue to do good work!
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit 8e88e3cf7f8c40b3fda166f0beb5a577ba15d32b
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jul 03 11:04:33 2024
Migrate MultiInstanceInvalidationClient to Coroutines
This change moves the invalidation client to Coroutines, aligning with the rest of the Coroutine-based Invalidation Tracker refactor for KMP. It also changes when the 'all-tables' observer is registered. The observer will now be registered when the client is created in an start(), which should always be on a background thread during InvalidationTracker.internalInit(). This reduces the likelihood of missing invalidations ( b/324260327 ) it also keeps things simple and avoids the racing nature of onServiceConnected and onServiceDisconnected being used to register / unregister the observer ( b/350927013 ).
This CL also greatly cleans up the MultiInstanceInvalidationTest which has been plague with flaky and inconsistent tests due to its concurrency nature. First, it removes the benchmark relates tests, they need to be properly moved to the benchmark integration project. Second it removes asserting behaviour using LiveData, since there is a lot of thread hopping it is harder to keep it deterministic yet it doesn't provide additional coverage, as long as observers are asserted to be invalidated it is expected then that observers that back LiveData would also be invalidated.
Bug: 309996304
Bug: 350927013
Bug: 324260327
Bug: 324274513
Bug: 335890993
Bug: 330519843
Bug: 186405912
Test: MultiInstanceInvalidationTest
Change-Id: I26cbc06c752da7e465dc9ec8831ef5bc5e343606
M room/integration-tests/testapp/lint-baseline.xml
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/MultiInstanceInvalidationTest.java
M room/integration-tests/testapp/src/main/java/androidx/room/integration/testapp/SampleDatabaseService.java
M room/integration-tests/testapp/src/main/java/androidx/room/integration/testapp/database/CustomerDao.java
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/MultiInstanceInvalidationTest.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/MultiInstanceInvalidationClient.android.kt
M room/room-runtime/src/commonMain/kotlin/androidx/room/InvalidationTracker.kt
https://android-review.googlesource.com/3159516
Branch: androidx-main
commit 8e88e3cf7f8c40b3fda166f0beb5a577ba15d32b
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jul 03 11:04:33 2024
Migrate MultiInstanceInvalidationClient to Coroutines
This change moves the invalidation client to Coroutines, aligning with the rest of the Coroutine-based Invalidation Tracker refactor for KMP. It also changes when the 'all-tables' observer is registered. The observer will now be registered when the client is created in an start(), which should always be on a background thread during InvalidationTracker.internalInit(). This reduces the likelihood of missing invalidations (
This CL also greatly cleans up the MultiInstanceInvalidationTest which has been plague with flaky and inconsistent tests due to its concurrency nature. First, it removes the benchmark relates tests, they need to be properly moved to the benchmark integration project. Second it removes asserting behaviour using LiveData, since there is a lot of thread hopping it is harder to keep it deterministic yet it doesn't provide additional coverage, as long as observers are asserted to be invalidated it is expected then that observers that back LiveData would also be invalidated.
Bug: 309996304
Bug: 350927013
Bug: 324260327
Bug: 324274513
Bug: 335890993
Bug: 330519843
Bug: 186405912
Test: MultiInstanceInvalidationTest
Change-Id: I26cbc06c752da7e465dc9ec8831ef5bc5e343606
M room/integration-tests/testapp/lint-baseline.xml
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/MultiInstanceInvalidationTest.java
M room/integration-tests/testapp/src/main/java/androidx/room/integration/testapp/SampleDatabaseService.java
M room/integration-tests/testapp/src/main/java/androidx/room/integration/testapp/database/CustomerDao.java
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/MultiInstanceInvalidationTest.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/MultiInstanceInvalidationClient.android.kt
M room/room-runtime/src/commonMain/kotlin/androidx/room/InvalidationTracker.kt
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit a37ee53f537021055f60bb1e7ce3cfd5a0765047
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 15 14:49:45 2024
Migrate auto-close to Coroutines
This change moves AutoCloser and relevant classes to Coroutines, aligning with the rest of the Coroutine-based infra refactor for KMP. It also reduces the lock contention by using atomics and avoiding the usage of the lock object along with improving the auto-boxing of binding arguments in the AutoClosingSQLiteStatement.
This CL also adds an internal 'Watch' interface to get the uptime in millis for time tracking, enabling time movement using a fake watch for tests. By using a test watch along with a TestCoroutineDispatcher, this CL fixes the flaky tests that have plague auto-close for a while and removes the usages of Thread.sleep(), thus creating deterministic tests.
Bug: 182343970
Bug: 189775887
Bug: 190607416
Bug: 266993269
Bug: 271325600
Bug: 283959848
Bug: 309996304
Test: ./gradlew room:room-runtime:cAT
Change-Id: I8e7e243d11d2aed63d84254f94b5626b3de89394
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/MultiInstanceInvalidationTest.kt
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoCloserTest.kt
A room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoCloserTestWatch.kt
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoClosingRoomOpenHelperFactoryTest.kt
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoClosingRoomOpenHelperTest.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/AutoCloser.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/AutoClosingRoomOpenHelper.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/AutoClosingRoomOpenHelperFactory.android.kt
https://android-review.googlesource.com/3174340
Branch: androidx-main
commit a37ee53f537021055f60bb1e7ce3cfd5a0765047
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 15 14:49:45 2024
Migrate auto-close to Coroutines
This change moves AutoCloser and relevant classes to Coroutines, aligning with the rest of the Coroutine-based infra refactor for KMP. It also reduces the lock contention by using atomics and avoiding the usage of the lock object along with improving the auto-boxing of binding arguments in the AutoClosingSQLiteStatement.
This CL also adds an internal 'Watch' interface to get the uptime in millis for time tracking, enabling time movement using a fake watch for tests. By using a test watch along with a TestCoroutineDispatcher, this CL fixes the flaky tests that have plague auto-close for a while and removes the usages of Thread.sleep(), thus creating deterministic tests.
Bug: 182343970
Bug: 189775887
Bug: 190607416
Bug: 266993269
Bug: 271325600
Bug: 283959848
Bug: 309996304
Test: ./gradlew room:room-runtime:cAT
Change-Id: I8e7e243d11d2aed63d84254f94b5626b3de89394
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/MultiInstanceInvalidationTest.kt
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoCloserTest.kt
A room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoCloserTestWatch.kt
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoClosingRoomOpenHelperFactoryTest.kt
M room/room-runtime/src/androidInstrumentedTest/kotlin/androidx/room/support/AutoClosingRoomOpenHelperTest.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/AutoCloser.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/AutoClosingRoomOpenHelper.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/AutoClosingRoomOpenHelperFactory.android.kt
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit d808c0479afff771af035c6cc822c1b37b4541f5
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jul 17 17:25:01 2024
Migrate query interceptor to Coroutines
Bug: 309996304
Test: QueryInterceptorTest
Change-Id: I92d044162d672325edacdcefa4e42652e1404525
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ListenableFuturePagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelper.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelperFactory.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorStatement.android.kt
https://android-review.googlesource.com/3181000
Branch: androidx-main
commit d808c0479afff771af035c6cc822c1b37b4541f5
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jul 17 17:25:01 2024
Migrate query interceptor to Coroutines
Bug: 309996304
Test: QueryInterceptorTest
Change-Id: I92d044162d672325edacdcefa4e42652e1404525
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/ListenableFuturePagingSourceTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelper.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelperFactory.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorStatement.android.kt
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit dd675f1fac8b398237480cb69ecbe92e37aff27f
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 19 11:25:47 2024
Update query interceptor API to take Coroutine context
Updates the query callback API to use a provided coroutine context if given.
Bug: 309996304
Bug: 354047950
Bug: 354051564
Test: QueryInterceptorTest
Relnote: "Add an overload of setQueryCallback() that accepts a CoroutineContext."
Change-Id: Id66ff055ce126085d50cad15f8982ad88c34267e
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/api/current.txt
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelper.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelperFactory.android.kt
https://android-review.googlesource.com/3185079
Branch: androidx-main
commit dd675f1fac8b398237480cb69ecbe92e37aff27f
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Fri Jul 19 11:25:47 2024
Update query interceptor API to take Coroutine context
Updates the query callback API to use a provided coroutine context if given.
Bug: 309996304
Bug: 354047950
Bug: 354051564
Test: QueryInterceptorTest
Relnote: "Add an overload of setQueryCallback() that accepts a CoroutineContext."
Change-Id: Id66ff055ce126085d50cad15f8982ad88c34267e
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/api/current.txt
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomDatabase.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelper.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/support/QueryInterceptorOpenHelperFactory.android.kt
ap...@google.com <ap...@google.com> #11
Project: platform/frameworks/support
Branch: androidx-main
commit be1ba95905b53d8e3d9b51257f02835ff5f96bce
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Aug 01 15:14:37 2024
Migrate LiveData result binder to driver API
Also refactor RoomTrackingLiveData infra to Coroutine so driver APIs can be used.
Bug: 309996304
Test: DaoKotlinCodeGenTest
Change-Id: I75388ed6c7f7a55cea12f17aa1393b54742db7e5
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/LiveDataQueryResultBinder.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/withLambda/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/withoutLambda/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/liveDataCallable.kt
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationLiveDataContainer.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomTrackingLiveData.android.kt
https://android-review.googlesource.com/3205550
Branch: androidx-main
commit be1ba95905b53d8e3d9b51257f02835ff5f96bce
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Aug 01 15:14:37 2024
Migrate LiveData result binder to driver API
Also refactor RoomTrackingLiveData infra to Coroutine so driver APIs can be used.
Bug: 309996304
Test: DaoKotlinCodeGenTest
Change-Id: I75388ed6c7f7a55cea12f17aa1393b54742db7e5
M room/room-compiler/src/main/kotlin/androidx/room/ext/xpoet_ext.kt
M room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/LiveDataQueryResultBinder.kt
M room/room-compiler/src/test/test-data/daoWriter/output/javac/withLambda/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/javac/withoutLambda/ComplexDao.java
M room/room-compiler/src/test/test-data/daoWriter/output/ksp/ComplexDao.java
M room/room-compiler/src/test/test-data/kotlinCodeGen/liveDataCallable.kt
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationLiveDataContainer.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/InvalidationTracker.android.kt
M room/room-runtime/src/androidMain/kotlin/androidx/room/RoomTrackingLiveData.android.kt
da...@google.com <da...@google.com>
pr...@google.com <pr...@google.com> #12
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-compiler:2.7.0-alpha06
androidx.room:room-runtime:2.7.0-alpha06
androidx.room:room-runtime-android:2.7.0-alpha06
androidx.room:room-runtime-iosarm64:2.7.0-alpha06
androidx.room:room-runtime-iossimulatorarm64:2.7.0-alpha06
androidx.room:room-runtime-iosx64:2.7.0-alpha06
androidx.room:room-runtime-jvm:2.7.0-alpha06
androidx.room:room-runtime-linuxx64:2.7.0-alpha06
androidx.room:room-runtime-macosarm64:2.7.0-alpha06
androidx.room:room-runtime-macosx64:2.7.0-alpha06
Description