Status Update
Comments
ch...@google.com <ch...@google.com> #2
All extensions in 'core-ktx' target either 'core' or the framework types. This is working as expected. It sounds like this is a feature request for a transition-ktx with equivalent extensions for the androidx.transition types.
> as most framework classes are being deprecated in favor of their AndroidX counterparts, Fragments for example.
"Most"? This *dramatically* overstates what is actually happening. Fragments (and loaders) were added to the framework in a time where the Android team did not have external libraries for shipping features. Transition was added 5 years later.
ch...@google.com <ch...@google.com> #3
If the Transition api is unlikely to change, there is no need for a transition-ktx for androidx.transition types. If developers should use Androidx transitions over framework transitions where possible however, then it would be much appreciated.
I am well aware of the limitations that existed when Fragments and Loaders were created, and when the Transition api was introduced.
ch...@google.com <ch...@google.com> #4
Branch: androidx-master-dev
commit ae42e311ecfbac18cedc90e489d1fdde956a4557
Author: Jake Wharton <jakew@google.com>
Date: Fri Nov 22 11:13:30 2019
Introduce transition-ktx for standalone transition library
These extensions are the same as androidx.core.transition for the platform types, just adapted to the standalone library.
Bug: 138870873
Test: gw :transition:transition-ktx:build :transition:transition-ktx:connectedCheck
Change-Id: Ie80022cc60ed1f482b7593db5ef1ac1c5ea33d8d
M buildSrc/src/main/kotlin/androidx/build/PublishDocsRules.kt
M jetifier/jetifier/migration.config
M settings.gradle
A transition/transition-ktx/OWNERS
A transition/transition-ktx/api/1.4.0-alpha01.txt
A transition/transition-ktx/api/current.txt
A transition/transition-ktx/api/public_plus_experimental_1.4.0-alpha01.txt
A transition/transition-ktx/api/public_plus_experimental_current.txt
A transition/transition-ktx/api/res-1.4.0-alpha01.txt
A transition/transition-ktx/api/restricted_1.4.0-alpha01.txt
A transition/transition-ktx/api/restricted_current.txt
A transition/transition-ktx/build.gradle
A transition/transition-ktx/src/androidTest/AndroidManifest.xml
A transition/transition-ktx/src/androidTest/java/androidx/transition/TestActivity.kt
A transition/transition-ktx/src/androidTest/java/androidx/transition/TransitionTest.kt
A transition/transition-ktx/src/androidTest/res/layout/test_activity.xml
A transition/transition-ktx/src/main/AndroidManifest.xml
A transition/transition-ktx/src/main/java/androidx/transition/Transition.kt
ch...@google.com <ch...@google.com> #5
Note to Andrei: After the aosp/2423347, the cross-inline lambda is capturing the $composer
parameter from the caller instead of using the $composer
parameter passed in to the lambda it was inlined into. This causes changes to be made to the composer that is not currently being used for composition which confused the recomposer.
ch...@google.com <ch...@google.com> #6
This issue affects crossinline
lambdas that are inlined into another lambda, as demonstrated by the repro case above, when the composable lambda is executed with a different composer than the function declaring the lambda. A different composer is used when a lambda is invoked in a subcomposition such as a dialog, BoxWithConstraints
, and LazyColumn
, amoung others.
A crossinline
lambda is requred because it is illegal to invoke an non-crossinline
lambda in a realized lambda (which is what crossinline
allows).
The easiest work-around is to remove inline
from the function which avoids the expanding of the lambda in another lambda required for this bug to manifest.
ub...@gmail.com <ub...@gmail.com> #7
Thank you for the elaboration! The non-inline workaround is what I've been using since this code broke.
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 9a5e5b6351ecaf5b888c75dfa75aea8360afc6a9
Author: Andrei Shikov <ashikov@google.com>
Date: Fri Mar 24 19:26:38 2023
Use composer of the correct scope when realizing groups
Updates function body transform to use composer parameter from target scope to realize groups. The realize call can happen outside of such scope and composer parameter is not guaranteed to be the same between scope where groups are being realize and current scope at the time of the call.
Test: CompositionTests
Fixes: 274786923
Change-Id: I0cc3c7be151edb7cbbe4114fffbde8736f7ec428
M compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/ControlFlowTransformTests.kt
M compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/FunctionBodySkippingTransformTests.kt
M compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TargetAnnotationsTransformTests.kt
M compose/compiler/compiler-hosted/integration-tests/src/test/java/androidx/compose/compiler/plugins/kotlin/TraceInformationTest.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableFunctionBodyTransformer.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/IrSourcePrinter.kt
M compose/runtime/runtime/src/commonTest/kotlin/androidx/compose/runtime/CompositionTests.kt
na...@google.com <na...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.runtime:runtime:1.5.0-alpha02
Description
Jetpack Compose version: Compose BOM 2023.03.00, Compose Compiler 1.4.4
Jetpack Compose component used: compiler
Android Studio Build: N/A
Kotlin version: 1.8.10
This is a regression first introduced in Compose Compiler 1.4.3, it worked fine in 1.4.2. It may be related to the fixes that Chuck is working on right now, e.g. https://issuetracker.google.com/issues/264467571
Steps to Reproduce or Code Sample to Reproduce:
Minimal repro project athttps://github.com/bubenheimer/composeinlinebug
This looks a little funny only because it's a minimal repro.
Stack trace (if applicable):