peekandpoke
05/12/2022, 11:54 AM> Task :core:compileTestDevelopmentExecutableKotlinJs FAILED
e: java.lang.NullPointerException
at org.jetbrains.kotlin.ir.backend.js.ic.InvalidationKt.actualizeCacheForModule(invalidation.kt:444)
at org.jetbrains.kotlin.cli.js.K2JsIrCompiler.doExecute(K2JsIrCompiler.kt:220)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:178)
at org.jetbrains.kotlin.cli.js.K2JSCompiler.doExecute(K2JSCompiler.java:71)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:91)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:43)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:93)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1623)
at sun.reflect.GeneratedMethodAccessor82.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
It worked and suddenly stopped working. We are also not doing anything fancy here. Just a normal gradle.build configuration.
I see that the NPE is thrown here in `invalidation.kt:444`:peekandpoke
05/12/2022, 11:55 AMlibraries
and lib.toCannonicalPath()
!
I was able to attach a debugger to gradle process, but my breakpoints are ignored in IntelliJ.
So what could I do to find out what is wrong here?Chris Lee
05/12/2022, 1:02 PMlibraries[lib.toCanonicalPath()]
into a variable and print it out when null (avoid the !!
as that is causing your NPE)peekandpoke
05/12/2022, 1:06 PMpeekandpoke
05/12/2022, 1:06 PMChris Lee
05/12/2022, 1:09 PMisCacheMap
you could list out all the libs (their canonical path) and (somehow) confirm those align with that is in the libraries map.peekandpoke
05/12/2022, 1:12 PMChris Lee
05/12/2022, 1:16 PMpeekandpoke
05/12/2022, 1:19 PMpeekandpoke
05/12/2022, 2:29 PMkotlin.compiler.execution.strategy=in-process
and then run
./gradlew check -Dorg.gradle.debug=true
This will wait for the debugger to attach on Port 5005peekandpoke
05/12/2022, 2:53 PMkotlinx-coroutines-core.1.6.1
And my lib pulls kotlinx-coroutines-core.1.6.0
Somehow the compiler does not remove the smaller version from the icCacheMap
which some steps later results in the NPE.peekandpoke
05/12/2022, 2:53 PMkotlinx-coroutines-core.1.6.1
the errors is gone.peekandpoke
05/12/2022, 2:56 PMpeekandpoke
05/12/2022, 5:42 PM