Kotlin / kotlin-jupyter

Kotlin kernel for Jupyter/IPython
Apache License 2.0
1.1k stars 105 forks source link

Setting `JupyterApiResourcesTask.libraryProducers` doesn't disable `kapt` that causes incompatibility with JDK 16 #322

Closed CommanderTvis closed 2 years ago

CommanderTvis commented 2 years ago

Build script: https://github.com/mipt-npm/kmath/blob/foreign-memory/kmath-jupyter/build.gradle.kts Exception:

Caused by: java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x6003f591) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x6003f591
    at org.jetbrains.kotlin.kapt3.base.KaptContext.<init>(KaptContext.kt:29)
    at org.jetbrains.kotlin.kapt3.base.Kapt.kapt(Kapt.kt:33)
ileasile commented 2 years ago

Hi! Please set kotlin.jupyter.add.scanner Gradle property to false (i.e. in gradle.properties) and recheck

CommanderTvis commented 2 years ago

kotlin.jupyter.add.scanner

That works but should be mentioned in the documentation.

ileasile commented 2 years ago

It is mentioned a bit above in the same document

ileasile commented 2 years ago

You may PR edits to this file to make it clearer

CommanderTvis commented 2 years ago

It is mentioned a bit above in the same document

It is, but it's unclear that removing that dependency disables kapt.

ileasile commented 2 years ago

Will be glad to merge the changes to the documentation that makes it clearer