Status Update
Comments
mg...@google.com <mg...@google.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
ap...@google.com <ap...@google.com> #3
ap...@google.com <ap...@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
mg...@google.com <mg...@google.com>
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Move MutableStateSerializer
to savedstate-compose
Expand for full commit details
Move `MutableStateSerializer` to `savedstate-compose`
- This change moves `MutableStateSerializer` from `lifecycle-viewmodel-compose` to `savedstate-compose`. This corrects its previous misplacement and aligns with the design outlined in go/savedstate-compose, which specifies that all `savedstate-compose` related APIs should reside within the `savedstate-compose` module.
RelNote: "Move `MutableStateSerializer` to `savedstate-compose`."
Test: MutableStateSerializerTest
Bug: 378895074
Change-Id: I4f690e41dc5619d185784409170943abeb0f0550
Files:
- M
lifecycle/lifecycle-viewmodel-compose/api/current.txt
- M
lifecycle/lifecycle-viewmodel-compose/api/restricted_current.txt
- M
savedstate/savedstate-compose/api/current.txt
- M
savedstate/savedstate-compose/api/restricted_current.txt
- M
savedstate/savedstate-compose/src/androidInstrumentedTest/kotlin/androidx/savedstate/compose/serialization/serializers/MutableStateSerializerTest.android.kt
- M
savedstate/savedstate-compose/src/commonMain/kotlin/androidx/savedstate/compose/serialization/serializers/MutableStateSerializer.kt
Hash: f845eabb6c5e3b138059839e59f383f70304d792
Date: Wed Jan 29 11:31:04 2025
pr...@google.com <pr...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-viewmodel-compose:2.9.0-alpha10
androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.0-alpha10
androidx.lifecycle:lifecycle-viewmodel-compose-desktop:2.9.0-alpha10
androidx.savedstate:savedstate-compose:1.3.0-alpha08
androidx.savedstate:savedstate-compose-android:1.3.0-alpha08
androidx.savedstate:savedstate-compose-jvmstubs:1.3.0-alpha08
androidx.savedstate:savedstate-compose-linuxx64stubs:1.3.0-alpha08
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add SnapshotStateMapSerializer
Expand for full commit details
Add `SnapshotStateMapSerializer`
- Add `SnapshotStateMapSerializer` to support `mutableStateMapOf`.
RelNote: "Add `SnapshotStateMapSerializer` to support `mutableStateMapOf`."
Bug: 378895074
Test: SnapshotStateMapSerializerTest
Change-Id: Ie6f1905cb2004c75efc4e962a6a6275773259af8
Files:
- M
savedstate/savedstate-compose/api/current.txt
- M
savedstate/savedstate-compose/api/restricted_current.txt
- M
savedstate/savedstate-compose/bcv/native/current.txt
- A
savedstate/savedstate-compose/src/androidInstrumentedTest/kotlin/androidx/savedstate/compose/serialization/serializers/SnapshotStateMapSerializerTest.kt
- A
savedstate/savedstate-compose/src/commonMain/kotlin/androidx/savedstate/compose/serialization/serializers/SnapshotStateMapSerializer.kt
Hash: 88190ed6a4e2b4a6b18f5b8ac4e6f16aa65a51dd
Date: Thu Feb 20 14:13:23 2025
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add SnapshotStateListSerializer
Expand for full commit details
Add `SnapshotStateListSerializer`
- Add `SnapshotStateListSerializer` to support `mutableStateListOf`.
RelNote: "Add `SnapshotStateListSerializer` to support `mutableStateListOf`."
Bug: 378895074
Test: SnapshotStateListSerializerTest
Change-Id: I4d888f709797a1b2f87490af0758baa4da78660d
Files:
- M
savedstate/savedstate-compose/api/current.txt
- M
savedstate/savedstate-compose/api/restricted_current.txt
- M
savedstate/savedstate-compose/bcv/native/current.txt
- A
savedstate/savedstate-compose/src/androidInstrumentedTest/kotlin/androidx/savedstate/compose/serialization/serializers/SnapshotStateListSerializerTest.kt
- A
savedstate/savedstate-compose/src/commonMain/kotlin/androidx/savedstate/compose/serialization/serializers/SnapshotStateListSerializer.kt
Hash: 97fa891fa692abb5e574c1c42d21a7a0d626768c
Date: Wed Feb 19 18:46:34 2025
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Clean-up MutableStateSerializer
Expand for full commit details
Clean-up `MutableStateSerializer`
Bug: 378895074
Test: MutableStateSerializerTest
Change-Id: I429cff7fb9947da4cfd3c12b4411773f89151e65
Files:
- M
savedstate/savedstate-compose/src/commonMain/kotlin/androidx/savedstate/compose/serialization/serializers/MutableStateSerializer.kt
Hash: 74e185a819ed398f68d21f68d41c69efaca97105
Date: Thu Feb 20 20:27:08 2025
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Clean-up MutableStateFlowSerializer
Expand for full commit details
Clean-up `MutableStateFlowSerializer`
Bug: 378895074
Test: MutableStateFlowSerializerTest
Change-Id: Ied12e735a56d1b64122f404a6e323da250e7856f
Files:
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/serializers/MutableStateFlowSerializer.kt
Hash: 67a3a5bb0bea13142f2585932d66b1970938975b
Date: Thu Feb 20 21:25:57 2025
Description
saveable
has built-in support for Compose'sMutableState
, supporting this use case:It does this by providing an overloaded function that handles
MutableState.value
and serializes it when needed.To help people migrate from
saveable
tosaved
, we want to supportMutableState
in our KotlinX serialization support.While working on
getMutableState
, I experimented with this and created a naiveKSerializer
implementation to handleMutableState
.Here’s what it could look like:
For serialization, we'd use
(value as MutableState<T>).value
+valueSerializer
to serialize the content. Deserialization works in the opposite direction.Here’s a usage example:
However, calling this without the serializer would cause an exception.
Our variant should work like
saveable
: ifT
(the generic type insaved
) is serializable, it should work without needing the serializer.The goal is to find the best way to support
MutableState
insaved
(using aKSerializer
, overloads, or another method).Related to b/378895070 .