Hi I’m struggled for hours now to investigate thi...
# compiler
e
Hi I’m struggled for hours now to investigate this:
Copy code
./gradlew build
Configuration on demand is an incubating feature.

> Task :ServerCommon:kaptGenerateStubsKotlin FAILED
e: org.jetbrains.kotlin.util.ReenteringLazyValueComputationException


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':ServerCommon:kaptGenerateStubsKotlin'.
> Internal compiler error. See log for more details
how can I get into the details? It’s a JVM project, using kotlin and java as well.
stackoverflow 1
yeah I did research but didn’t find anything useful, the most frequent answer I see is to run
gradle --assembleDebug
but my project is not android
d
Please report about it to kotl.in/issue
e
FYI I’ve added some info on a minimum project setup, but here are the keys:
Copy code
// build.gradle.kts
dependencies {
    kapt("com.google.dagger:dagger-compiler:2.27")
}

// class structure that fails:
sealed class Thing<T> {
    // fun defaultValue(): String = // with explicit return type, build passes
    fun defaultValue() =
        when(this) {
            StringThing -> "string"
            StringSubThing -> "stringSub"
        }
}

sealed class SubThing<T, K> : Thing<T>()
object StringThing : Thing<String>()
object StringSubThing : SubThing<String, String>()
So
defaultValue
method return type has to be explicitly defined (maybe this is a known problem). What really annoys me is the missing details on the output.