Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove isTransitive in compose for newer compose versions #875

Merged
merged 4 commits into from
May 11, 2023

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented May 11, 2023

It seems like isTransitive = false caused below error when the compose version was 1.4.3

[debug] [EspressoDriver@633b (599df58e)] [Instrumentation] io.appium.espressoserver.EspressoServerRunnerTest:
[debug] [EspressoDriver@633b (599df58e)] [Instrumentation] Error in startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
[debug] [EspressoDriver@633b (599df58e)] java.lang.AbstractMethodError: abstract method "kotlin.coroutines.CoroutineContext$Key androidx.compose.ui.platform.InfiniteAnimationPolicy.getKey()"
[debug] [EspressoDriver@633b (599df58e)] 	at kotlin.coroutines.CoroutineContext$plus$1.invoke(CoroutineContext.kt:33)
[debug] [EspressoDriver@633b (599df58e)] 	at kotlin.coroutines.CoroutineContext$plus$1.invoke(CoroutineContext.kt:32)
[debug] [EspressoDriver@633b (599df58e)] 	at kotlin.coroutines.CoroutineContext$Element$DefaultImpls.fold(CoroutineContext.kt:70)
[debug] [EspressoDriver@633b (599df58e)] 	at androidx.compose.ui.platform.InfiniteAnimationPolicy$DefaultImpls.fold(InfiniteAnimationPolicy.kt:36)
[debug] [EspressoDriver@633b (599df58e)] 	at androidx.compose.ui.test.AndroidComposeUiTestEnvironment$infiniteAnimationPolicy$1.fold(ComposeUiTest.android.kt:271)
[debug] [EspressoDriver@633b (599df58e)] 	at kotlin.coroutines.CoroutineContext$DefaultImpls.plus(CoroutineContext.kt:32)
[debug] [EspressoDriver@633b (599df58e)] 	at kotlin.coroutines.CombinedContext.plus(CoroutineContextImpl.kt:111)
[debug] [EspressoDriver@633b (599df58e)] 	at androidx.compose.ui.test.AndroidComposeUiTestEnvironment.<init>(ComposeUiTest.android.kt:280)
[debug] [EspressoDriver@633b (599df58e)] 	at androidx.compose.ui.test.junit4.AndroidComposeTestRule$special$$inlined$AndroidComposeUiTestEnvironment$1.<init>(ComposeUiTest.android.kt:218)
[debug] [EspressoDriver@633b (599df58e)] 	at androidx.compose.ui.test.junit4.AndroidComposeTestRule.<init>(AndroidComposeTestRule.android.kt:352)
[debug] [EspressoDriver@633b (599df58e)] 	at androidx.compose.ui.test.junit4.AndroidComposeTestRule.<init>(AndroidComposeTestRule.android.kt:224)
[debug] [EspressoDriver@633b (599df58e)] 	at io.appium.espressoserver.EspressoServerRunnerTest.<init>(EspressoServerRunnerTest.kt:45)
[debug] [EspressoDriver@633b (599df58e)] [Instrumentation] Time: 0.047

Potentially this will fix #812 as well.

@KazuCocoa KazuCocoa closed this May 11, 2023
@KazuCocoa KazuCocoa deleted the compose-1.4.3 branch May 11, 2023 02:46
@KazuCocoa KazuCocoa restored the compose-1.4.3 branch May 11, 2023 02:46
@KazuCocoa KazuCocoa reopened this May 11, 2023
@KazuCocoa
Copy link
Member Author

hm, let me check the error

@KazuCocoa KazuCocoa changed the title feat: bump the default compose deps version to 1.4.3 feat: remove isTransitive in compose for newer compose versions May 11, 2023
@KazuCocoa
Copy link
Member Author

It seems like test app for the compose scenario is not good for newer compose version with {"additionalAndroidTestDependencies": ["androidx.lifecycle:lifecycle-extensions:2.2.0", "androidx.activity:activity:1.3.1", "androidx.fragment:fragment:1.3.4"]}. Maybe the app itself should have newer compose version at least.

I locally tested at least newer compose without isTransitive = false succeeded building regular our Appium's android test app while with isTransitive = false caused the description's error.

@@ -141,7 +141,6 @@ dependencies {
because("Android Compose support")
}
androidTestImplementation("androidx.compose.ui:ui-test-junit4:${composeVersion}") {
isTransitive = false
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if the value should be set conditionally then based on the actual composeVersion provided into the script

@KazuCocoa KazuCocoa merged commit d82abda into master May 11, 2023
@KazuCocoa KazuCocoa deleted the compose-1.4.3 branch May 11, 2023 16:21
github-actions bot pushed a commit that referenced this pull request May 11, 2023
## [2.22.0](v2.21.1...v2.22.0) (2023-05-11)

### Features

* remove isTransitive in compose for newer compose versions ([#875](#875)) ([d82abda](d82abda))
@github-actions
Copy link

🎉 This PR is included in version 2.22.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants