You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The kotlin2cpg frontend uses at least one function from the compiler that is only available on 1.x, meaning it fails for kotlin 2.x
I am invoking the frontend from a kotlin 2.x project which uses kotlin scripting and thus embeds its own kotlin compiler, meaning at runtime it seems to resolve the 2.x compiler rather than the embedded one in the kotlin2cpg frontend.
java.lang.NoSuchMethodError: 'boolean org.jetbrains.kotlin.resolve.jvm.JvmPrimitiveType.isWrapperClassName(org.jetbrains.kotlin.name.FqName)'
at io.joern.kotlin2cpg.types.TypeRenderer.maybeUnwrappedRender(TypeRenderer.scala:88)
at io.joern.kotlin2cpg.types.TypeRenderer.renderForDescriptor$$anonfun$1(TypeRenderer.scala:106)
To Reproduce
Steps to reproduce the behavior:
Attempt to invoke the kotlin2cpg frontend with kotlin 2.x compiler on the classpath
Expected behavior
CPG is created successfully
Screenshots
N/A
Desktop (please complete the following information):
OS: macOS 15
Joern Version: 4.0.115
Java version: 17
The text was updated successfully, but these errors were encountered:
The kotlin2cpg frontend uses at least one function from the compiler that is only available on 1.x, meaning it fails for kotlin 2.x
I am invoking the frontend from a kotlin 2.x project which uses kotlin scripting and thus embeds its own kotlin compiler, meaning at runtime it seems to resolve the 2.x compiler rather than the embedded one in the kotlin2cpg frontend.
See:
joern/joern-cli/frontends/kotlin2cpg/src/main/scala/io/joern/kotlin2cpg/types/TypeRenderer.scala
Line 88 in 398af04
This uses JvmPrimitiveType.isWrapperClassName, which seems to have been renamed in 2.x to JvmPrimitiveType.isWrapperClassInternalName, causing a failure for 2.x kotlin projects.
Partial stacktrace:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
CPG is created successfully
Screenshots
N/A
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: