New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackOverflowError in dokkaHtml for a multiplatform project when using actual typealiases #2281
Comments
Unfortunately, I can not reproduce this with your configuration. I suppose you have ambiguous |
I tried your version and it is indeed not happening there. However, I still get the same problem in our project even with the newest Dokka version. I’ll investigate further and try to reproduce it within a smaller project. |
I have exactly the same issue and same as in the original post it was with
The suggested workaround to use a fully qualified name instead of using imports works like a charm. The other workaround that came to my mind is to use import aliases import kotlin.native.ref.WeakReference as NativeWeakReference
actual typealias WeakReference<T> = NativeWeakReference<T> Import aliases mitigate the ambiguity in a pretty much same way as fully qualified names though may look a bit nicer. |
@anthony-novikov Can you provide your sample project to reproduce this? |
@vmishenev I experienced this issue on one of our internal projects that I can't share, but I'll try to extract the minimal configuration to a demo project and if it's still reproducible I'll share it to you tomorrow. |
It appears extracting the code to a demo app didn't take that much time as I initially thought, so here it is: https://github.com/anthony-novikov/dokka-weak-ref-demo. Hopefully this will help. |
Thank you for the reproducer. It helped to detect a problem. The fix will be in Dokka 1.7.20. |
Describe the bug
I’m using Dokka 1.6.0 in a Kotlin multiplatform project and it crashes with the following exception:
Expected behaviour
No exception is thrown.
To Reproduce
I tracked it down to our expect/actual typealias for WeakReference on iOS:
Common:
iOS Implementation:
It seems that Dokka gets confused by the
WeakReference<T> = WeakReference<T>
part and ends up in infinite recursion. The following workaround fixes the problem:Dokka configuration
Just running
./gradlew dokkaHtml
Installation
Are you willing to provide a PR?
Possibly - need a hint where to start though.
The text was updated successfully, but these errors were encountered: