Status Update
Comments
a....@gmail.com <a....@gmail.com> #2
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
my...@gmail.com <my...@gmail.com> #3
el...@google.com <el...@google.com> #4
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
el...@google.com <el...@google.com>
sp...@gmail.com <sp...@gmail.com> #5
Is there a workaround for this issue?
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