Is there any way to get more info about an interna...
# announcements
s
Is there any way to get more info about an internal Kotlin compiler error other than the stacktrace that is printed? Like which line in the project caused the compiler error perhaps?
j
I had this problem before with Kotlin Native and then I took the effort to checkout and learn to run the native compiler/linker in debug mode. Then I found a hint where it exactly went wrong. I documented the process to debug native in the issue: https://github.com/JetBrains/kotlin-native/issues/2864#issuecomment-504641546
s
Thank you for the link! I am not using Kotlin Native however, only Kotlin JVM for now. I will try to look into how to run the compiler in debug mode for Kotlin JVM, if I can. I really know nothing of how to debug a compiler error, but since I can't repro this on any other project my options are pretty limited and I need a workaround asap.
l
I think it shows in the logs what it was compiling when it crashed.
s
From what I can tell, it shows what caused the crash in the Kotlin compiler, but not what the compiler was trying to compile when it crashed, unless I'm reading it wrong.
I just managed to find the bit of code that threw my compiler error (finally!) after a tedious session of commenting out things one at a time. Filed a report on YouTrack, but would still like to know better debugging options if anyone has any ideas.
l
If the Youtrack issue is public, can you link it there?
1
s
Did you mean link it here? I have added my logs to the YouTrack issue, if that's what you meant.
l
Yes, that's exactly what I said, so we can vote on it. Note that if needed, you can add private attachments (for Kotlin Team and you) to a YouTrack issue.
s
https://youtrack.jetbrains.com/issue/IDEA-230937 Here is the issue. We are restructuring quite a bit of our project at the moment so we will have a workaround in the meantime.
l
the issue is wholly private it seems, I get a 404.
s
Hmm, whoops! Changed visibility settings. Thanks for the support 👍 I don't expect this to be fixed anytime soon with their focus on the new compiler, but I suppose it's good to document in case it pops up again.