Status Update
Comments
a....@gmail.com <a....@gmail.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:
my...@gmail.com <my...@gmail.com> #3
Will try to use the example provided by you to check if it fixes the issue.
el...@google.com <el...@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")
}
el...@google.com <el...@google.com>
sp...@gmail.com <sp...@gmail.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"
da...@google.com <da...@google.com> #6
A workaround might be to avoid @Relation
and instead use a Map return type arg, but otherwise we are working on getting this fix for the next release.
sp...@gmail.com <sp...@gmail.com> #7
Thanks for the advice. For my case I have multiple relations. Temporarily, I changed it to a Flow<List>
. I'll wait for the next release to use PagingSource
.
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
Author: elifbilgin <
Link:
Fix broken Relation support in Room Paging KMP.
Expand for full commit details
Fix broken Relation support in Room Paging KMP.
This CL fixes an issue in code generation in Room Paging which emerged when using @Relation with PagingSource. The solution resolves the issue by declaring a new suspend convertRows() method that can acquire a connection to perform the query.
Bug: 369136627
Test: BaseQueryTest.kt
Relnote: Revisit the newly added convertRows() method signature to be a suspend function that receives a RawRoomQuery for room-paging.
Change-Id: Ie57b558e217ce995a7d3dfe772c314aabbfcda8c
Files:
- M
room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
- M
room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/SampleDatabase.kt
- M
room/room-compiler/src/main/kotlin/androidx/room/solver/binderprovider/MultiTypedPagingSourceQueryResultBinderProvider.kt
- M
room/room-compiler/src/main/kotlin/androidx/room/solver/query/result/MultiTypedPagingSourceQueryResultBinder.kt
- M
room/room-compiler/src/test/test-data/common/input/LimitOffsetPagingSource.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/multiTypedPagingSourceResultBinder.kt
- M
room/room-paging/bcv/native/current.txt
- M
room/room-paging/src/androidInstrumentedTest/kotlin/androidx/room/paging/LimitOffsetPagingSourceTest.kt
- M
room/room-paging/src/androidMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.android.kt
- M
room/room-paging/src/commonMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
- M
room/room-paging/src/commonMain/kotlin/androidx/room/paging/util/RoomPagingUtil.kt
- M
room/room-paging/src/jvmNativeMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.jvmNative.kt
Hash: 1abf563063f91b5459a43da0b533822c34ced782
Date: Mon Sep 23 17:29:24 2024
el...@google.com <el...@google.com>
ba...@gmail.com <ba...@gmail.com> #9
Thanks!!!
el...@google.com <el...@google.com> #10
Version 2.7.0-alpha11 should be the one to include this fix!
pr...@google.com <pr...@google.com> #11
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-compiler:2.7.0-alpha11
androidx.room:room-paging:2.7.0-alpha11
androidx.room:room-paging-android:2.7.0-alpha11
androidx.room:room-paging-iosarm64:2.7.0-alpha11
androidx.room:room-paging-iossimulatorarm64:2.7.0-alpha11
androidx.room:room-paging-iosx64:2.7.0-alpha11
androidx.room:room-paging-jvm:2.7.0-alpha11
androidx.room:room-paging-linuxarm64:2.7.0-alpha11
androidx.room:room-paging-linuxx64:2.7.0-alpha11
androidx.room:room-paging-macosarm64:2.7.0-alpha11
androidx.room:room-paging-macosx64:2.7.0-alpha11
Description