Stately icon indicating copy to clipboard operation
Stately copied to clipboard

2.0.0-rc1 import crashing in multiplatform project.

Open jQrgen opened this issue 2 years ago • 11 comments

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 avatar Mar 02 '23 14:03 jQrgen

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 avatar Mar 02 '23 17:03 jQrgen

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.

jQrgen avatar Mar 02 '23 17:03 jQrgen

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

yamilmedina avatar Apr 03 '23 12:04 yamilmedina

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!

jmsilva-wit avatar Apr 04 '23 17:04 jmsilva-wit

Hey team 👋 Are there any news on this topic ?

yamilmedina avatar Jun 01 '23 10:06 yamilmedina

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

russhwolf avatar Jun 27 '23 15:06 russhwolf

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 avatar Jun 27 '23 20:06 yamilmedina

Hi team 👋 Quick question. What should be the way to proceed this issue? This PR https://github.com/touchlab/Stately/pull/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.

yamilmedina avatar Aug 15 '23 12:08 yamilmedina

@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")
            }
        }

bennysway avatar Sep 04 '23 20:09 bennysway

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

yamilmedina avatar Sep 05 '23 08:09 yamilmedina

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

findjigar avatar Sep 22 '23 19:09 findjigar