Status Update
Comments
ku...@google.com <ku...@google.com>
sg...@google.com <sg...@google.com>
ze...@google.com <ze...@google.com> #2
Related to
nu...@gmail.com <nu...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add MutableStateFlowSerializer
for serializing MutableState
Expand for full commit details
Add `MutableStateFlowSerializer` for serializing `MutableState`
- Introduced an inline `MutableStateFlowSerializer` function to infer and retrieve the appropriate `KSerializer` for `MutableStateFlow` of a serializable type.
- Added an overload of `MutableStateFlowSerializer` that accepts an explicit `KSerializer` for the wrapped type, allowing for customizing the `KSerializer`.
- Implemented `MutableStateFlowSerializerImpl`, a private class that handles the serialization and deserialization logic for `MutableStateFlow`, delegating inner value processing to the provided `KSerializer`.
- Only `KSerializer<MutableStateFlow<T>>` is exposed; the `MutableStateFlowSerializerImpl` remains private.
RelNote: "Add `MutableStateFlowSerializer` for serializing `kotlinx.coroutines.flow.MutableStateFlow`."
Test: MutableStateFlowSerializerTest.kt
Fixes: 378895070
Change-Id: I6a8925772d2f124d2db4a83bff0062c1db0eb0fb
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/build.gradle
- A
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/serializers/MutableStateFlowSerializer.kt
- A
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/serialization/MutableStateFlowSerializerTest.kt
Hash: 3f45907910984f32745d62d9846e7083a3c75e4a
Date: Mon Jan 20 12:32:07 2025
ze...@google.com <ze...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.savedstate:savedstate:1.3.0-alpha07
androidx.savedstate:savedstate-android:1.3.0-alpha07
androidx.savedstate:savedstate-desktop:1.3.0-alpha07
androidx.savedstate:savedstate-iosarm64:1.3.0-alpha07
androidx.savedstate:savedstate-iossimulatorarm64:1.3.0-alpha07
androidx.savedstate:savedstate-iosx64:1.3.0-alpha07
androidx.savedstate:savedstate-linuxarm64:1.3.0-alpha07
androidx.savedstate:savedstate-linuxx64:1.3.0-alpha07
androidx.savedstate:savedstate-macosarm64:1.3.0-alpha07
androidx.savedstate:savedstate-macosx64:1.3.0-alpha07
ze...@google.com <ze...@google.com> #5
mkroghj@: Main has a somewhat different AndroidApiLevelUtils.isApiSafeForInlining
than 3.2. Do you know if there might be some fixes to pull back. Also, is the API modeling supposed to be on in 3.2?
mk...@google.com <mk...@google.com> #6
This is very odd indeed. I've checked and I cannot figure out any place where we would assign null into the computed api level for that version.
And regarding the api model being enabled in 3.2, the first thing we did was to stop inlining/merging things on newer apis into older. We therefore do api caller identification but do not do outlining and no stubbing.
Was it possible to share the input as specified in
nu...@gmail.com <nu...@gmail.com> #7
ze...@google.com <ze...@google.com> #8
Thanks! I have received the dump and can reproduce the issue. The underlying issue is present on all versions since 3.2 but is only reproducible on 3.3.1-dev and forward running with assertions enabled. We are looking into the issue now.
ap...@google.com <ap...@google.com> #9
Branch: main
commit f443f05b4ff24c3bb6e66a5dfff02d83d98c96d3
Author: Ian Zerny <zerny@google.com>
Date: Wed May 25 13:37:00 2022
Fix and regression test for lambda with undefined interface.
Bug:
Bug:
Change-Id: I845f13b92121f2ae1eba470246ded606464d5bf6
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
A src/test/java/com/android/tools/r8/regress/UndefinedLambdaInterfaceRegress232379893.java
ap...@google.com <ap...@google.com> #10
Branch: 3.3
commit f01039962a911dc29184ba487bcf3d90b7fa4289
Author: Ian Zerny <zerny@google.com>
Date: Mon May 30 10:42:33 2022
Version 3.3.50
Bug:
Change-Id: Iae4dbecfe506b8181ba1f6dfba393eb90de21b19
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #11
Branch: 3.3
commit c305898fe4e69948615ff12bede2935f5730e508
Author: Ian Zerny <zerny@google.com>
Date: Mon May 30 10:42:13 2022
Fix and regression test for lambda with undefined interface.
Bug:
Bug:
Change-Id: I845f13b92121f2ae1eba470246ded606464d5bf6
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
A src/test/java/com/android/tools/r8/regress/UndefinedLambdaInterfaceRegress232379893.java
ap...@google.com <ap...@google.com> #12
Branch: 3.2
commit 08a16c6db5601619397115afcca8299c54ff5e58
Author: Ian Zerny <zerny@google.com>
Date: Mon May 30 09:58:28 2022
Version 3.2.67
Bug:
Change-Id: I421fd4876472aa20a5e1be09b1f15113cb04399f
M src/main/java/com/android/tools/r8/Version.java
ap...@google.com <ap...@google.com> #13
Branch: 3.2
commit 78870ca788a10694186e8e1f08653461028c666e
Author: Ian Zerny <zerny@google.com>
Date: Mon May 30 09:58:03 2022
Fix and regression test for lambda with undefined interface.
Bug:
Bug:
Change-Id: I845f13b92121f2ae1eba470246ded606464d5bf6
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
A src/test/java/com/android/tools/r8/regress/UndefinedLambdaInterfaceRegress232379893.java
ap...@google.com <ap...@google.com> #14
Branch: 3.3
commit c305898fe4e69948615ff12bede2935f5730e508
Author: Ian Zerny <zerny@google.com>
Date: Mon May 30 10:42:13 2022
Fix and regression test for lambda with undefined interface.
Bug:
Bug:
Change-Id: I845f13b92121f2ae1eba470246ded606464d5bf6
M src/main/java/com/android/tools/r8/shaking/Enqueuer.java
A src/test/java/com/android/tools/r8/regress/UndefinedLambdaInterfaceRegress232379893.java
ze...@google.com <ze...@google.com>
nu...@gmail.com <nu...@gmail.com> #15
In which version is the fix available?
Still happening in Gradle 7.2.1.
ze...@google.com <ze...@google.com> #16
The fix is in AGP 7.3.0-beta04. To use it in 7.2 you will need to update your config to pull in a more recent version of R8 (at least 3.2.67). Do so by amending your settings.gradle
(or kt) as follows:
pluginManagement {
buildscript {
repositories {
mavenCentral()
maven {
url = uri("https://storage.googleapis.com/r8-releases/raw")
}
}
dependencies {
classpath("com.android.tools:r8:3.2.67")
}
}
}
mo...@gmail.com <mo...@gmail.com> #17
ji...@gmail.com <ji...@gmail.com> #18
I have recently encounter this when trying to generating release APK, it happend during stage of minifyReleaseWithR8. The error message looks like following:
AGPBI: {"kind":"error","text":"java.lang.NullPointerException: Cannot invoke \"com.android.tools.r8.androidapi.ComputedApiLevel$KnownApiLevel.getApiLevel()\" because the return value of \"com.android.tools.r8.androidapi.ComputedApiLevel.asKnownApiLevel()\" is null","sources":[{"file":"/Users/jianinz/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-reflect/1.8.21/662838019bc1141f8a311180d93b9e13765c7f55/kotlin-reflect-1.8.21.jar"}],"tool":"R8"}
Android Studio Giraffe | 2022.3.1 Patch 1
Build #AI-223.8836.35.2231.10671973, built on August 17, 2023
Runtime version: 17.0.6+0-17.0.6b829.9-10027231 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.4.1
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Metal Rendering is ON
AGP Version: 8.1.1
Gradle Version 8.0
ze...@google.com <ze...@google.com> #19
Thanks for reaching out. I've filed
Description
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:minifyNdkDevReleaseWithR8'.
> com.android.tools.r8.CompilationFailedException: Compilation failed to complete, position: Lkotlinx/coroutines/debug/AgentPremain$$InternalSyntheticLambda$0$7895cd395e43c061a299e224a1d3672f97bd4610fe97f0e188c9c199a1620b54$0;handle(Lsun/misc/Signal;)V, origin: /Users/nucruz/.gradle/caches/transforms-3/688fae1a38ed3ed45ae18ecd84cdaf5b/transformed/jetified-kotlinx-coroutines-core-jvm-1.6.1.jar:kotlinx/coroutines/debug/AgentPremain.class
I've tried different coroutines versions and the problem persists. The guilty part is Gradle 7.2.0. With v7.1.3 this was not happening.
____________________________________________________
Build: AI-212.5712.43.2112.8512546, 202204281627,
AI-212.5712.43.2112.8512546, JRE 11.0.12+0-b1504.28-7817840x64 JetBrains s.r.o., OS Mac OS X(aarch64) v12.3.1, screens 3456.0x2234.0, 1920.0x1080.0; Retina
AS: Chipmunk | 2021.2.1; Kotlin plugin: 212-1.6.21-release-334-AS5457.46; Android Gradle Plugin: 7.2.0; Gradle: 7.3.3; Gradle JDK: version 11.0.12; NDK: from local.properties: (not specified), latest from SDK: 22.1.7171670; LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)Source: send_feedback_icon
IMPORTANT: Please read