Getting NPE on kapt task :grimacing: (using Kotlin...
# compiler
s
Getting NPE on kapt task 😬 (using Kotlin
1.5.30
, Lang Level
1.6
& Jdk 17). Has anybody seen this error?
Copy code
> Task :kaptGenerateStubsKotlin
....

w: Language version 1.6 is experimental, there are no backwards compatibility guarantees for new language and library features
w: ATTENTION!
This build uses unsafe internal compiler arguments:

-XXLanguage:+JvmRecordSupport

This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!

w: Language version 1.6 is experimental, there are no backwards compatibility guarantees for new language and library features
Compilation with Kotlin compile daemon was not successful
java.lang.NullPointerException
        at org.jetbrains.kotlin.incremental.IncrementalJvmCache.addToClassStorage(IncrementalJvmCache.kt:494)
        at org.jetbrains.kotlin.incremental.IncrementalJvmCache.saveFileToCache(IncrementalJvmCache.kt:171)
        at org.jetbrains.kotlin.incremental.BuildUtilKt.updateIncrementalCache(buildUtil.kt:110)
        at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.updateCaches(IncrementalJvmCompilerRunner.kt:326)
        at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.updateCaches(IncrementalJvmCompilerRunner.kt:112)
d
Please file an issue https://kotl.in/issue
t
You may also want to check out - https://youtrack.jetbrains.com/issue/KT-45545
s
@Tomasz Krakowiak thanks..i do have all the workaround mentioned (add-opens for strong encapsulation) and is working on lang version 1.5. Issue happens only with 1.6.