Status Update
Comments
so...@google.com <so...@google.com>
ig...@jetbrains.com <ig...@jetbrains.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
st...@gmail.com <st...@gmail.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
he...@gmail.com <he...@gmail.com> #5
This works:
LinearProgressIndicator(
progress = 0.1f,
modifier = Modifier
.fillMaxWidth()
.height(6.dp),
)
This throw the runtime error:
LinearProgressIndicator(
modifier = Modifier
.fillMaxWidth()
.height(6.dp),
)
Many thanks.
lu...@rewe-digital.com <lu...@rewe-digital.com> #6
Be aware there is a ripple effect with other dependencies, which transitively pull compose.animation:animation-core:1.6.0
where this bug apparently originates.
E.g. we have experienced the same ProgressIndicator crash when updating accompanist-permissions
to 0.34.0
(even though we explicitly use compose-bom:2023.10.01
)
BTW compose-bom:2023.10.01
also includes material3:1.1.2
but there is no crash (when not using other libraries like accompanist
), so this issue is apparently related to changes from animation-core:1.6.0
not being properly backwards compatible with material3:1.1.2
.
[Deleted User] <[Deleted User]> #7
This should be fixed, it's an stable compose bom and it's supposed to be stable and intercompatible
ak...@gmail.com <ak...@gmail.com> #8
ti...@google.com <ti...@google.com> #9
This crash has already been fixed. We also cherry-picked the fix into stable release. Please see fix in
bl...@gmail.com <bl...@gmail.com> #10
bl...@gmail.com <bl...@gmail.com> #11
What version of the bom is it fixed in? On the BOM mapping website (
lu...@rewe-digital.com <lu...@rewe-digital.com> #12
The latest stable release of animation-core
is still (as of today)
[Deleted User] <[Deleted User]> #13
Still crashing! We'll need 2024.01.01 bom in order to fix that
ad...@gmail.com <ad...@gmail.com> #14
Using manual versions of Compose 1.6.0, M3 1.2.0-rc01, and Compiler 1.5.8, we don't have any crashes.
However, all tests that have LinearProgressIndicator(value = { animatedValue })
in their tree have suddenly started failing due to timeouts (~25s or so) claiming Compose is "busy". We have double-checked via Layout Inspector & SideEffect logs, and there are no recompositions or animations running.
We found ourselves needing to programmatically advance frame-by-frame (autoAdvance = false
) to make our tests pass again.
animation
. I couldn't find a more specific issue for this.
ia...@google.com <ia...@google.com> #15
There will be a new BOM that will contain this and other fixes. For issues like this, the general process is that we fix and validate on the active branch (1.7 in this case). Since this is a critical issue, we then cherrypick it for an updated 1.6 release, but we have to do additional testing to verify the fix on that branch (and also make sure any other cherry picks don't interfere). After everything is validated, the fix will go out with the next release run. We also avoid Friday releases as much as possible.
ma...@sap.com <ma...@sap.com> #16
os...@google.com <os...@google.com> #17
The release includes compose.animation:animation-core:1.6.1 which fixes the compatibility issue.
Description
BOM 2024.01.00
Compiler: 1.5.8
Jetpack Compose component(s) used:
```
implementation(platform("androidx.compose:compose-bom:2024.01.00"))
implementation("androidx.compose.animation:animation")
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3") // broken
// implementation("androidx.compose.material3:material3:1.2.0-alpha09") // broken
// implementation("androidx.compose.material3:material3:1.2.0-alpha10") // works
```
Android Studio Build:
Android Studio Hedgehog | 2023.1.1 Patch 2
Build #AI-231.9392.1.2311.11330709, built on January 18, 2024
Runtime version: 17.0.7+0-b2043.56-10550314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
external.system.auto.import.disabled=true
debugger.new.tool.window.layout=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.experimental.ui=true
Non-Bundled Plugins:
com.intellij.marketplace (231.9392.3)
IdeaVIM (2.7.5)
Kotlin version: 1.9.22
Steps to Reproduce or Code Sample to Reproduce:
Latest Compose BOM includes Material3 1.1.2, but crashes when using `CircularProgressIndicator`.
It seems to be broken up to `1.2.0-alpha09` and fixed in `1.2.0-alpha10`.
Seems to be related to:
Deprecated `KeyframesSpecConfig#with` in favor
`KeyframesSpecConfig#using` which preserves the builder pattern.
Stack trace (if applicable):
```
FATAL EXCEPTION: main
Process: com.example.myapplication, PID: 6283
java.lang.NoSuchMethodError: No virtual method at(Ljava/lang/Object;I)Landroidx/compose/animation/core/KeyframesSpec$KeyframeEntity; in class Landroidx/compose/animation/core/KeyframesSpec$KeyframesSpecConfig; or its super classes (declaration of 'androidx.compose.animation.core.KeyframesSpec$KeyframesSpecConfig' appears in /data/app/~~l53SEQHlclwrpyq6xMN31Q==/com.example.myapplication-cyhiJMv2nxNy-8rnfYPq8g==/base.apk)
at androidx.compose.material3.ProgressIndicatorKt$CircularProgressIndicator$endAngle$1.invoke(ProgressIndicator.kt:371)
at androidx.compose.material3.ProgressIndicatorKt$CircularProgressIndicator$endAngle$1.invoke(ProgressIndicator.kt:369)
at androidx.compose.animation.core.AnimationSpecKt.keyframes(AnimationSpec.kt:649)
at androidx.compose.material3.ProgressIndicatorKt.CircularProgressIndicator-LxG7B9w(ProgressIndicator.kt:369)
at com.example.myapplication.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:22)
at com.example.myapplication.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:21)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:186)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:119)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:118)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:110)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:139)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:138)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:248)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:138)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:123)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:90)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3302)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3235)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:723)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1071)
at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:631)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:617)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:123)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1289)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:114)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:164)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:322)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:199)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:121)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1364)
at android.view.View.dispatchAttachedToWindow(View.java:23198)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3694)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3701)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3701)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3701)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3701)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3847)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:3239)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:11197)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1650)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1659)
at android.view.Choreographer.doCallbacks(Choreographer.java:1129)
at android.view.Choreographer.doFrame(Choreographer.java:1055)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1622)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8893)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
```