How can I see the sources of the Kotlin stdlib in ...
# intellij
a
How can I see the sources of the Kotlin stdlib in idea? No matter what I do and which jar I try to attach I still see /* compiled code */ in the implementations. Download sources doesn't work it doesn't to anything. What can I do? This is how it looks like:
1
f
This is actually always the case for every Kotlin file. Sources only work for classes.
a
https://youtrack.jetbrains.com/issue/KTIJ-912 Sources are not displayed for file facades (@JvmName) opened from Project View As a workaround, it should help to "Go to symbol", it will open the full source of found declaration.
a
@Fleshgrinder that's not true. It was working before and now I don't see the sources. How do I attach the sources?
@Alexey Belkov [JB] that issue is 5 years old and that problem is still not solved. I'm looking at the Kotlin stdlib and half of the classes have sources, and the another half don't. The whole thing seems completely random. This greatly hinders discoverability of the Kotlin source which is sometimes a must to understand how things work since they contain the kdocs! Why can't you solve this in 5 years?
1
@Alexey Belkov [JB] is there an ETA on this? This BUG makes it impossible to properly debug Kotlin library code!
a
Yes, it's currently targeted at 2021.3 Idea release.