icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
352 stars 22 forks source link

I experienced an error generated in KSwift when I updated the kotlin version and kmp-nativecoroutines version #67

Closed Egi10 closed 1 year ago

Egi10 commented 1 year ago

I updated Kotlin Version to 1.7.20 and updated KMP-NativeCoroutines to version 0.13.1.

The error is like this:

e: java.lang.NoSuchMethodError: 'void org.jetbrains.kotlin.ir.util.IrUtilsKt.passTypeArgumentsFrom$default(org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression, org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer, int, int, java.lang.Object)'
        at com.rickclephas.kmp.nativecoroutines.compiler.KmpNativeCoroutinesIrTransformer.callOriginalFunction(KmpNativeCoroutinesIrTransformer.kt:162)
        at com.rickclephas.kmp.nativecoroutines.compiler.KmpNativeCoroutinesIrTransformer.createNativeBody(KmpNativeCoroutinesIrTransformer.kt:111)
        at com.rickclephas.kmp.nativecoroutines.compiler.KmpNativeCoroutinesIrTransformer.visitFunctionNew(KmpNativeCoroutinesIrTransformer.kt:100)
        at org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext.visitFunction(IrElementTransformerVoidWithContext.kt:83)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:72)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:73)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitSimpleFunction(IrElementTransformerVoid.kt:24)
        at org.jetbrains.kotlin.ir.declarations.IrSimpleFunction.accept(IrSimpleFunction.kt:28)
        at org.jetbrains.kotlin.ir.IrElementBase.transform(IrElementBase.kt:24)
        at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
        at org.jetbrains.kotlin.ir.declarations.IrClass.transformChildren(IrClass.kt:56)
        at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitDeclaration(IrElementTransformerVoid.kt:57)

Is there any solution for this ?

Egi10 commented 1 year ago

I wrote the same issue on KMP-NativeCoroutines : https://github.com/rickclephas/KMP-NativeCoroutines/issues/84

Alex009 commented 1 year ago

stacktrace shows that problem in https://github.com/rickclephas/KMP-NativeCoroutines not in moko-kswift.