Hi. I've got a project I'm trying to build using I...
# kotlinx-rpc
t
Hi. I've got a project I'm trying to build using InteliJ IDE instead of Gradle but I get this kotlinc compile exception:
Copy code
Kotlin: [Internal Error] java.lang.NoClassDefFoundError: org/jetbrains/kotlin/com/intellij/psi/PsiElement
	at kotlinx.rpc.codegen.checkers.diagnostics.FirRpcStrictModeDiagnostics.<init>(FirRpcDiagnostics.kt:48)
	at kotlinx.rpc.codegen.FirCheckersContext.<init>(FirRpcAdditionalCheckers.kt:48)
	at kotlinx.rpc.codegen.FirRpcAdditionalCheckers.<init>(FirRpcAdditionalCheckers.kt:31)
	at kotlinx.rpc.codegen.FirRpcExtensionRegistrar.configurePlugin$lambda$1(FirRpcExtensionRegistrar.kt:32)
	at org.jetbrains.kotlin.fir.extensions.FirExtensionService.registerExtensions(FirExtensionService.kt:43)
	at org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrarKt.registerExtensions(FirExtensionRegistrar.kt:285)
	at org.jetbrains.kotlin.fir.session.FirSessionConfigurator.configure(FirSessionConfigurator.kt:53)
	at org.jetbrains.kotlin.fir.session.FirAbstractSessionFactory.createModuleBasedSession(FirAbstractSessionFactory.kt:124)
	at ..... 58 more lines
Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.com.intellij.psi.PsiElement
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 58 more
Since the Gradle compilation works I'm going to split my rpc code into a separate module and use it as a library instead of from source. Any tips or is this a known issue? I can DM my project if needed (6mb zipped). I've tried combinations of kotlin 2.1.10 / 2.0.0 , rpc 0.5.0 + 0.4.0, and the FIR IDE Plugin 0.0.2 and (unreleased) 0.1.0 (built locally)
a
Hi! Can you explain a little more about what do you mean by building for Intellij?
From the error message I can say that for some reason the compiler you use is not the one that is used in gradle (gradle uses embeddable version of it which has remapped packages) Anyway, if it is not time sensitive issue, it should probably be fixed in 0.6.0 as we stopped using this class that causes problems