Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

conflict with coroutines after updating from korio 1.12.0 to 2.0.3 #115

Closed
hardysim opened this issue Dec 4, 2020 · 8 comments
Closed

Comments

@hardysim
Copy link

hardysim commented Dec 4, 2020

I'm using org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2-native-mt and com.soywiz.korlibs.korio:korio 1.12.0 in a multiplatform app.

When trying to update korio it will no longer build on ios:

> Task :shared:linkDebugFrameworkIosX64
e: Compilation failed: Unbound symbols not allowed
	Unbound public symbol for public kotlinx.coroutines/Delay.invokeOnTimeout|-1360839616470570076[0]

 * Source files: 
 * Compiler version info: Konan: 1.4.20 / Kotlin: 1.4.20
 * Output kind: STATIC_CACHE

e: java.lang.AssertionError: Unbound symbols not allowed
	Unbound public symbol for public kotlinx.coroutines/Delay.invokeOnTimeout|-1360839616470570076[0]
	at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:93)
	at org.jetbrains.kotlin.backend.konan.PsiToIrKt.psiToIr(PsiToIr.kt:126)
	at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt:134)
	at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:97)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:95)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:30)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:94)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:41)
	at org.jetbrains.kotlin.backend.konan.KonanDriverKt.runTopLevelPhases(KonanDriver.kt:29)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:78)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:35)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
e: Compilation failed: Unbound symbols not allowed

	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithGradleRenderer$1.invoke(K2Native.kt:277)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithGradleRenderer$1.invoke(K2Native.kt:261)
	at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:27)
	at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:21)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithGradleRenderer(K2Native.kt:276)
	at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithGradleRenderer(K2Native.kt:458)
	at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:43)
	at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt)
	at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:17)
	at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMain(main.kt:43)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:100)
	at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:73)
	at org.jetbrains.kotlin.gradle.tasks.CacheBuilder.ensureDependencyPrecached(KotlinNativeTasks.kt:782)
	at org.jetbrains.kotlin.gradle.tasks.CacheBuilder.ensureDependencyPrecached(KotlinNativeTasks.kt:704)
	at org.jetbrains.kotlin.gradle.tasks.CacheBuilder.buildCompilerArgs(KotlinNativeTasks.kt:838)
	at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.buildCompilerArgs(KotlinNativeTasks.kt:556)
	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinNativeCompile.buildArgs(KotlinNativeTasks.kt:300)
	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinNativeCompile.compile(KotlinNativeTasks.kt:315)
	at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.compile(KotlinNativeTasks.kt:627)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$3.run(ExecuteActionsTaskExecuter.java:555)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:540)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:523)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:108)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:271)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:260)
	at org.gradle.internal.execution.steps.ExecuteStep.lambda$execute$1(ExecuteStep.java:34)
	at java.util.Optional.orElseGet(Optional.java:267)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:34)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:26)
	at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:67)
	at org.gradle.internal.execution.steps.CleanupOutputsStep.execute(CleanupOutputsStep.java:36)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:49)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:34)
	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:43)
	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:73)
	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:54)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:44)
	at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:54)
	at org.gradle.internal.execution.steps.SnapshotOutputsStep.execute(SnapshotOutputsStep.java:38)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:42)
	at org.gradle.internal.execution.steps.CacheStep.executeWithoutCache(CacheStep.java:159)
	at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:72)
	at org.gradle.internal.execution.steps.CacheStep.execute(CacheStep.java:43)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:44)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:33)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:38)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:24)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:92)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:85)
	at java.util.Optional.map(Optional.java:215)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:55)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:39)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:76)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:37)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:36)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:26)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:94)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:79)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:53)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:74)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:78)
	at java.util.Optional.orElseGet(Optional.java:267)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:78)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:34)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:39)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:40)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:28)
	at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:33)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:187)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:179)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:41)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:372)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:359)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:352)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:338)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.lang.Thread.run(Thread.java:745)

e: java.lang.AssertionError: Unbound symbols not allowed


> Task :shared:linkDebugFrameworkIosX64 FAILED

Execution failed for task ':shared:linkDebugFrameworkIosX64'.
> Compilation finished with errors

Reverting to coroutines 1.3.9-native-mt-2 seems to work on ios (I can use the newer korio-version) but this will result in a build-error on android. I get the same error when trying to use coroutines 1.4 with korio 2.0.3:

Execution failed for task ':androidApp:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':androidApp:debugRuntimeClasspath'.
   > Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.4.2-native-mt}.
     Required by:
         project :androidApp > project :shared
      > Cannot find a version of 'org.jetbrains.kotlinx:kotlinx-coroutines-core' that satisfies the version constraints:
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:{strictly 1.4.2-native-mt}'
           Dependency path 'myapp:androidApp:unspecified' --> 'androidx.lifecycle:lifecycle-livedata-ktx:2.2.0' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.soywiz.korlibs.korio:korio:2.0.3' --> 'com.soywiz.korlibs.korio:korio-android:2.0.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.squareup.sqldelight:coroutines-extensions:1.4.3' --> 'com.squareup.sqldelight:coroutines-extensions-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
           Dependency path 'myapp:androidApp:unspecified' --> 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0-beta01' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-logging:1.4.3' --> 'io.ktor:ktor-client-logging-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-core:1.4.3' --> 'io.ktor:ktor-client-core-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-serialization:1.4.3' --> 'io.ktor:ktor-client-serialization-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-auth:1.4.3' --> 'io.ktor:ktor-client-auth-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-core:1.4.3' --> 'io.ktor:ktor-client-core-jvm:1.4.3' --> 'io.ktor:ktor-http:1.4.3' --> 'io.ktor:ktor-http-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-core:1.4.3' --> 'io.ktor:ktor-client-core-jvm:1.4.3' --> 'io.ktor:ktor-http-cio:1.4.3' --> 'io.ktor:ktor-http-cio-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-serialization:1.4.3' --> 'io.ktor:ktor-client-serialization-jvm:1.4.3' --> 'io.ktor:ktor-client-json:1.4.3' --> 'io.ktor:ktor-client-json-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-core:1.4.3' --> 'io.ktor:ktor-client-core-jvm:1.4.3' --> 'io.ktor:ktor-http:1.4.3' --> 'io.ktor:ktor-http-jvm:1.4.3' --> 'io.ktor:ktor-utils:1.4.3' --> 'io.ktor:ktor-utils-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-core:1.4.3' --> 'io.ktor:ktor-client-core-jvm:1.4.3' --> 'io.ktor:ktor-http-cio:1.4.3' --> 'io.ktor:ktor-http-cio-jvm:1.4.3' --> 'io.ktor:ktor-network:1.4.3' --> 'io.ktor:ktor-network-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'
           Dependency path 'myapp:androidApp:unspecified' --> 'myapp:shared:1.0' --> 'com.example.libhttp:libhttp:3.0.4' --> 'com.example.libhttp:libhttp-android-debug:3.0.4' --> 'io.ktor:ktor-client-core:1.4.3' --> 'io.ktor:ktor-client-core-jvm:1.4.3' --> 'io.ktor:ktor-http:1.4.3' --> 'io.ktor:ktor-http-jvm:1.4.3' --> 'io.ktor:ktor-utils:1.4.3' --> 'io.ktor:ktor-utils-jvm:1.4.3' --> 'io.ktor:ktor-io:1.4.3' --> 'io.ktor:ktor-io-jvm:1.4.3' --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9-native-mt-2'

The libraries libhttp and liboauth are mine and they're using ktor. They needed an update to ktor 1.4.3 so my main project (myapp) could build with the new coroutines-versions.

So I'm stuck being able to build only one of both platforms. The only workaround seems to remove korio (I'm also using klock 2.0.0 and * krypto 2.0.1* which are working fine).

@soywiz
Copy link
Collaborator

soywiz commented Dec 4, 2020

I'm trying to trigger this: https://github.com/korlibs/korio/actions/runs/400884601

It Ktor is using it, maybe we should use native-mt direclty too? And maybe provide a version without the mt.

What's exactly that native-mt? Is there any documentation on what changes and how it is intended to be used?

Found this:
https://kotlinlang.org/docs/mobile/concurrency-and-coroutines.html#multithreaded-coroutines

I guess you have tried:

implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1-native-mt"){
    version {
        strictly("1.4.1-native-mt")
    }
}

already right?

@soywiz
Copy link
Collaborator

soywiz commented Dec 4, 2020

Are you also aware of this?

Using multithreaded coroutines may result in memory leaks. This can be a problem for complex coroutine scenarios under load. We are working on a solution for this.

@hardysim
Copy link
Author

hardysim commented Dec 7, 2020

I guess you have tried

Correct, I'm forcing the mt-version via the strictly command

Are you also aware of this?

I am but because ktor forces us to also use the mt-version, we're all doomed ;-)
Just kidding. I've read this but I had no problems yet.

It Ktor is using it, maybe we should use native-mt direclty too? And maybe provide a version without the mt.

This might help. Currently, I cannot use korlibs.

@soywiz
Copy link
Collaborator

soywiz commented Dec 9, 2020

I think I will change to whatever ktor uses (-mt) in the next version if all the stack works, and I will provide a -non-mt version for korio if someone asks for it.

It seems that the deploy failed due to a failing test, I still have to check why it failed and redeploy.

@soywiz soywiz added this to Backlog in Korlibs via automation Dec 9, 2020
@soywiz soywiz moved this from Backlog to Team Active Tasks in Korlibs Dec 9, 2020
@soywiz
Copy link
Collaborator

soywiz commented Mar 10, 2021

I'm closing this for now. There are plans to change the memory model on Kotlin/Native, so probably in the future there will be only one single kotlinx.coroutines, and right now I don't have the bandwidth to handle this

@soywiz soywiz closed this as completed Mar 10, 2021
Korlibs automation moved this from Active Tasks to Done Mar 10, 2021
@hardysim
Copy link
Author

Shouldn't this issue stay open until the problem is resolved? Even when there is no time currently to dig into it or there might be a change in kotlinx.coroutines the actual problem won't go away, right? We might come back in the future when new versions of coroutines/ktor etc. are available and they might fix the issue and then we can close this issue here. I fear that a closed (but unresolved) issue will be easily looked over and never be fixed.

@soywiz
Copy link
Collaborator

soywiz commented Mar 10, 2021

Checking previous comments it seems that I did not explain my findings about this:

I tried to use the -mt version of the library on korge-next that include all the libraries and there were many issues, and checking and fixing all those would require an extra effort. So I decided to stick with the standard version on all the libraries, and the -mt version being an exception.

I already released a version of korio supporting mt: https://github.com/korlibs/korio/releases/tag/v2.0.3-native-mt
That should work with the -mt version of kotlinx.coroutines, right?
I closed it because I do not plan to release newer versions of the variant since right now it is hard for me to maintain two different versions and I don't have the bandwidth.
Probably newer versions of Kotlin won't require separate versions of kotlinx.coroutines, so this won't be a problem eventually.

I can move this issue to paused instead of closing it if you prefer that and you really believe it makes sense.

@hardysim
Copy link
Author

Ah, thank you. This piece was missing - I've waited for a fix in the normal version and not a mt-version as you said in #115 (comment).

I'll try your mt-version and come back if it does not fix my issue. This way, we can keep this issue closed until I respond that your fix (the mt-version) does not help.

@soywiz soywiz removed this from Done in Korlibs Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants