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
There are some guava classes in Kotlin-compiler, such as com.google .common.graph, if guava is also used in the subplugin of ksp, then because the parent delegation model of java will go to the father, that is, the guava in MemoryBasedClassLoader, which will lead to
Exception: java.lang. LinkageError: loader constraint violation: loader'app 'wants to load interface com.google common.base. Supplier. A different interface with the same name was previously loaded by org.jetbrains.kotlin.preloading.MemoryBasedClassLoader @4bbfb90a. (com.google common.base. Supplier is in unnamed module of loaderorg.jetbrains.kotlin.preloading.MemoryBasedClassLoader @4bbfb90a, parent loader'bootstrap')
The same error occurs with compile ksp in cli mode
Workaround:
Essentially, Kotlinc should solve the problem of isolation from the KSP environment, but considering that rules_kotlin builders currently have a relatively complete guava, I filtered out guava in the MemoryBasedClassLoader load condition, but this solution does not look elegant, and I would like to discuss how to deal with it.
Description:
There are some guava classes in Kotlin-compiler, such as com.google .common.graph, if guava is also used in the subplugin of ksp, then because the parent delegation model of java will go to the father, that is, the guava in MemoryBasedClassLoader, which will lead to
The same error occurs with compile ksp in cli mode
Workaround:
Essentially, Kotlinc should solve the problem of isolation from the KSP environment, but considering that rules_kotlin builders currently have a relatively complete guava, I filtered out guava in the MemoryBasedClassLoader load condition, but this solution does not look elegant, and I would like to discuss how to deal with it.
The text was updated successfully, but these errors were encountered: