Fixed
Status Update
Comments
mg...@google.com <mg...@google.com> #2
This was broken by 3bca759a5ff08352de831bb1e9b61b1ec2b3362d.
Fix (pending) is I2c2dc7b600603ee430fd0d91b23d52ea8aa29ca9.
Fix (pending) is I2c2dc7b600603ee430fd0d91b23d52ea8aa29ca9.
ap...@google.com <ap...@google.com> #3
Almost 2 months later and this is still broken
ap...@google.com <ap...@google.com> #4
Since there is no progression, I wanted to share our quick-fix for the issue.
#sdkmanager --package_file=${PATH_WORKSPACE}/packages
while read p; do echo "y" | sdkmanager "${p}"; done <${PATH_WORKSPACE}/packages
#sdkmanager --package_file=${PATH_WORKSPACE}/packages
while read p; do echo "y" | sdkmanager "${p}"; done <${PATH_WORKSPACE}/packages
mg...@google.com <mg...@google.com>
ap...@google.com <ap...@google.com> #5
jb...@google.com What is the update on this?
pr...@google.com <pr...@google.com> #6
What is the status of this item?
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 .