Front-end Internal error: Failed to analyze declaration

I keep getting this error after making some modest modifications (increasing length of string). I thought I had it fixed via a refactor of a method that had grown too long.

Question: is there a way that I can get some debug info? Or, can I debug the Kotlin compiler itself?

What kind of debug info do you want? And yes, the compiler is open source so you can just download it and debug it if you want.
But maybe you can start by explaining what your actual problem is. What are you trying to do? Short example code would be nice, same as the error message. Also if it is an internal compiler error you should create an issue here: https://kotl.in/issue

1 Like

Thanks for the response. It’s appreciated. I was vague because I really had nothing to go. I was hoping for somebody to tell me how to increase logging or emit the stack trace.

I did get a stack trace and opened : https://youtrack.jetbrains.com/issue/KT-36865

I’m hoping that: https://github.com/JetBrains/kotlin . is the right place.

I wa able to resolve this by increasing the Gradle memory by putting org.gradle.jvmargs=-Xmx2g into the gradle.properties, killing all gradle daemons, and deleting ~/.gradle. I haven’t seen the issue for a day now.