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

2.0.0-rc1 import crashing in multiplatform project. #93

Open
jQrgen opened this issue Mar 2, 2023 · 11 comments
Open

2.0.0-rc1 import crashing in multiplatform project. #93

jQrgen opened this issue Mar 2, 2023 · 11 comments

Comments

@jQrgen
Copy link

jQrgen commented Mar 2, 2023

Hello

Is there a Kotlin Multiplatform project example or open source project with a Kotlin/Native target that imports stately 2.0.0-rc1 or a higher version?

Using the config from README.md to set up Stately with version 2.0.0 is currently not working.

Thanks.

@jQrgen
Copy link
Author

jQrgen commented Mar 2, 2023

When I import the following dependencies to commonMain:

    implementation("co.touchlab:stately-strict:2.0.0-rc1")
    implementation("co.touchlab:stately-concurrency:2.0.0-rc1")
    implementation("co.touchlab:stately-concurrent-collections:2.0.0-rc1")

I get the following Error:

> Task :compileKotlinIosSimulatorArm64 FAILED
e: Could not find "co.touchlab:stately-common" in [/Users/jq/dev/libnexakotlin, /Users/jq/.konan/klib, /Users/jq/.konan/kotlin-native-prebuilt-macos-aarch64-1.8.10/klib/common, /Users/jq/.konan/kotlin-native-prebuilt-macos-aarch64-1.8.10/klib/platform/ios_simulator_arm64]

@jQrgen jQrgen changed the title Example project with stately 2.0.0-rc1+ 2.0.0-rc1 import crashing in multiplatform project. Mar 2, 2023
@jQrgen
Copy link
Author

jQrgen commented Mar 2, 2023

Should I wait for the release candidate or use the deprecated version for using Stately in production? "Release candidate" seems pretty close to production but it is hard to verify.

@yamilmedina
Copy link

Bump! same issue here, we are introducing the library to our project and we get the following error for iosTarget Should we use an older version of the library ? How much difference does it makes to downgrade ?

e: Could not find "co.touchlab:stately-common" in [/Users/runner/work/kalium/kalium, /Users/runner/.konan/klib, /Users/runner/.konan/kotlin-native-prebuilt-macos-x86_64-1.8.10/klib/common, /Users/runner/.konan/kotlin-native-prebuilt-macos-x86_64-1.8.10/klib/platform/ios_x64]

https://github.com/wireapp/kalium/actions/runs/4596441816/jobs/8117968805?pr=1614

@jmsilva-wit
Copy link

While trying to implement Stately on my project I also stumbled on this issue... Any estimate on when the fix will be applied? Thank you!

@yamilmedina
Copy link

Hey team 👋 Are there any news on this topic ?

@russhwolf
Copy link
Contributor

Does it work if you manually add stately-common to your project?

@yamilmedina
Copy link

Does it work if you manually add stately-common to your project?

Now shows the following error if I add the dependency manually when running tests,

Duplicate class co.touchlab.stately.HelpersJVMKt

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class co.touchlab.stately.HelpersJVMKt found in modules stately-common-jvm-2.0.0-rc1 (co.touchlab:stately-common-jvm:2.0.0-rc1) and stately-strict-jvm-2.0.0-rc1 (co.touchlab:stately-strict-jvm:2.0.0-rc1)

@yamilmedina
Copy link

Hi team 👋 Quick question. What should be the way to proceed this issue? This PR #96 has been stale for 4 months as well

For us is not a big of a deal, as we are currently live and working without this lib, but we wanted to move some implementations making use of this nice collections library module.

@bennysway
Copy link

@yamilmedina and anyone else who ended up stumbling on this bug. My build file should be sqeeaky clean after running hundreds of clean/sync/build. But this should fix the Duplicate class fix. (not saying it resolves the main tickets problem):

    sourceSets {
        val commonMain by getting {
            dependencies {
                /* other implementations */
                implementation("co.touchlab:stately-common:2.0.0-rc3")
                implementation("co.touchlab:stately-collections:2.0.0-rc3")
                implementation("co.touchlab:stately-concurrency:2.0.0-rc3")
                implementation("co.touchlab:stately-isolate:2.0.0-rc3")
            }

            configurations.all {
                exclude(group = "co.touchlab", module = "stately-strict-jvm")
            }
        }

@yamilmedina
Copy link

Thanks @bennysway this workaround helps us, appreciate the effort to pursue it :D

@findjigar
Copy link
Contributor

Latest version should fix this issue. Can anyone confirm once before I close this issue?

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

No branches or pull requests

6 participants