Fixed
Status Update
Comments
ti...@google.com <ti...@google.com>
as...@google.com <as...@google.com> #2
> The Transition Kotlin extensions target the Framework Transition class which is a bit confusing
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.
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.
ms...@hubspot.com <ms...@hubspot.com> #3
Pardon my misunderstanding, I was under the belief that where possible, new features that could be developed outside the framework, would be under Androidx. Also it's a common refrain to use the Androidx libraries over the framework libraries where possible, as those ship update independently of platform releases. I wasn't attempting to be dramatic.
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.
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.
bl...@gmail.com <bl...@gmail.com> #4
Project: platform/frameworks/support
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
https://android-review.googlesource.com/1172715
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
ms...@hubspot.com <ms...@hubspot.com> #5
same with compiler 1.5.8
as...@google.com <as...@google.com> #6
Re #4, it is fixed in compiler v1.5.5
Re #5, could you reproduce in a sample project? The transform works correctly when I try to repeat the steps above.
ms...@hubspot.com <ms...@hubspot.com> #7
Hi,
I have been unable to produce a sample project so far.
I have fixed it in our project by removing one layer of inheritance.
Our paparazzi tests had been structured like
TestClass <- PaparazziText (open) <- BasePaparraziTest (abstract)
removing the abstract class has fixed the issue.
I have been unable to produce a sample project so far.
I have fixed it in our project by removing one layer of inheritance.
Our paparazzi tests had been structured like
TestClass <- PaparazziText (open) <- BasePaparraziTest (abstract)
removing the abstract class has fixed the issue.
ys...@google.com <ys...@google.com> #8
Able to reproduce it with a commit to a github project.
Similar issue
Fails with
HansieClockTest > DeviceClockScreenshotTest > ClockScreenshotTest
Works with
HansieClockTest > ClockScreenshotTest
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit 7b2229e4d21425ca60a72478032d0f773a8766f9
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Mar 04 11:46:23 2024
Remap composable type on overridden functions of all dependencies
Compose compiler remaps types of immediately overridden function, but doesn't do so for base functions.
Fixes: 316196500
Test: add a cross module compilation test
Change-Id: I2c9f96f279736034e968bd20032c50e6de39f096
M compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/ComposeCrossModuleTests.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableTypeRemapper.kt
https://android-review.googlesource.com/2986209
Branch: androidx-main
commit 7b2229e4d21425ca60a72478032d0f773a8766f9
Author: Andrei Shikov <ashikov@google.com>
Date: Mon Mar 04 11:46:23 2024
Remap composable type on overridden functions of all dependencies
Compose compiler remaps types of immediately overridden function, but doesn't do so for base functions.
Fixes: 316196500
Test: add a cross module compilation test
Change-Id: I2c9f96f279736034e968bd20032c50e6de39f096
M compose/compiler/compiler-hosted/integration-tests/src/androidUnitTest/kotlin/androidx/compose/compiler/plugins/kotlin/ComposeCrossModuleTests.kt
M compose/compiler/compiler-hosted/src/main/java/androidx/compose/compiler/plugins/kotlin/lower/ComposableTypeRemapper.kt
pr...@google.com <pr...@google.com> #10
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.compiler:compiler-hosted:1.5.11
Description
Jetpack Compose component(s) used: compiler, ui, ui-test, ui-tooling
Android Studio Build:2023.2.1 Canary 14
Kotlin version:1.9.21
Steps to Reproduce or Code Sample to Reproduce:
We use paparazzi for screenshot testing, this is setup with a base test class which accepts a composable lambda.
Since updating compose-compiler, this function throws a ClassCastException
Stack trace (if applicable):
```
FullScreenPreviewTopBarScreenshotTest > testFullScreenPreviewTopBar[PIXEL_5_LIGHT_LARGE_FONT] FAILED
java.lang.ClassCastException: class androidx.compose.runtime.internal.ComposableLambdaImpl cannot be cast to class kotlin.jvm.functions.Function0 (androidx.compose.runtime.internal.ComposableLambdaImpl and kotlin.jvm.functions.Function0 are in unnamed module of loader 'app')
at com.x.android.files.preview.composables.FullScreenPreviewTopBarScreenshotTest.testFullScreenPreviewTopBar(FullScreenPreviewTopBarScreenshotTest.kt:10)
```
Test function
```
@Test
fun testFullScreenPreviewTopBar() =
runScreenshotTest {
FullScreenPreviewTopBarPreview()
}
```
Base class function
```
fun runScreenshotTest(content: @Composable () -> Unit) =
runTest(UnconfinedTestDispatcher()) {
paparazzi.snapshot {
CompositionLocalProvider(LocalInspectionMode provides true) {
CanvasTheme(
content = wrapInTestSurface(content),
darkTheme = config.deviceConfig.nightMode == NightMode.NIGHT,
)
}
}
}
```