KaterinaPetrova / mpp-sample-lib

Sample Kotlin Multiplatform library (jvm + ios + js)
36 stars 11 forks source link

Project doesn't build #8

Open keaukraine opened 9 months ago

keaukraine commented 9 months ago

I'm using IntelliJ IDEA Community Edition and cannot build this sample targeting JS.

Steps to reproduce:

  1. Clone project.
  2. Build JS artifact.

Error:

Kotlin: [Internal Error] kotlin.NotImplementedError: An operation is not implemented: not implemented
    at org.jetbrains.kotlin.daemon.RemoteIncrementalResultsConsumer.processIrFile(RemoteIncrementalResultsConsumer.kt:32)
    at org.jetbrains.kotlin.ir.backend.js.KlibKt.serializeModuleIntoKlib$processCompiledFileData(klib.kt:704)
    at org.jetbrains.kotlin.ir.backend.js.KlibKt.serializeModuleIntoKlib(klib.kt:737)
    at org.jetbrains.kotlin.ir.backend.js.KlibKt.generateKLib(klib.kt:142)
    at org.jetbrains.kotlin.ir.backend.js.KlibKt.generateKLib$default(klib.kt:125)
    at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.processSourceModule(K2JsIrCompiler.kt:468)
    at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:273)
    at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:181)
    at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:72)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:104)
    at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:48)
    at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:101)
    at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1449)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
    at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
keaukraine commented 9 months ago

OK I tried updating Kotlin MP plugin to 1.9.22 and now I'm getting another errors when building artifacts:

C:\Work\KotlinNative\mpp-sample-lib\src\jsMain\kotlin\io\github\katerinapetrova\mpplib\Base64.kt:3:15
Kotlin: Actual object 'Base64Factory' has no corresponding expected declaration
C:\Work\KotlinNative\mpp-sample-lib\src\jsMain\kotlin\io\github\katerinapetrova\mpplib\Base64.kt:4:33
Kotlin: Unresolved reference: Base64Encoder
C:\Work\KotlinNative\mpp-sample-lib\src\jsMain\kotlin\io\github\katerinapetrova\mpplib\Base64.kt:8:5
Kotlin: 'encode' overrides nothing

image