Status Update
Comments
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #2
For Kotlin 2.0 and KSP 2.0 the Cannot change attributes of configuration ':composeApp:debugFrameworkIosX64' after it has been locked for mutation
really seems like a KSP issue. You should file a bug in their repository with a sample app if possible.
If you downgrade to Kotlin 1.9 then things 'should' work, there are example apps out there with such configuration, like the following one:
ap...@google.com <ap...@google.com> #3
Will try to use the example provided by you to check if it fixes the issue.
ap...@google.com <ap...@google.com> #4
Note that this issue happens when applying the Compose, KSP and Room Plugin together in Kotlin 2.0.x, the workaround for now is to not use the Room Gradle Plugin and instead specify the schema location vis KSP arguments:
// In the build.gradle
ksp {
arg("room.schemaLocation", "${projectDir}/schemas")
}
da...@google.com <da...@google.com> #5
Hi, I encountered a similar problem and was able to resolve it by updating the dependencies
room = "2.7.0-alpha08"
ksp = "2.0.20-1.0.25"
compose-plugin = "1.6.11"
kotlin = "2.0.20"
ae...@gmail.com <ae...@gmail.com> #6
Good. Continue to do good work!
ap...@google.com <ap...@google.com> #7
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
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
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
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
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