dokka
dokka copied to clipboard
[K2] Unstable documentable order
The order of documentable packages is unstable. It can affect order of packages in a navigation menu.
Presumably it happens due to unstable order of source files. The order (traversing) of files depends on a system (linux/windows) https://github.com/Kotlin/dokka/actions/runs/6630172896/job/18012742052?pr=3227.
See the test two classes from different packages, but more tests of package order are required.
The order of functions also seems to be unstable compared to K1. This test reproduces it:
https://github.com/Kotlin/dokka/blob/4e47ed400ae51734a798c26b63baf58b50b7c0a4/dokka-subprojects/analysis-kotlin-api/src/test/kotlin/org/jetbrains/dokka/analysis/test/jvm/mixed/SampleMixedJvmAnalysisTest.kt#L75-L81
It's unclear what order we want to have in Dokka, by alphabet or as in code. First need to decide the product part.
Need to research which user-visible pages have undetermined / unstable order, and ask @d-ambatenne to help. If it's only internal and related to our plugin API, we can decide it internally.
It also affects a KDoc link of overload. See tests in #3447 But it is still user-invisible.
I have created KT-65110 to have a stable order internally.
Andrei has a local patch to fix it for testing, so it's not blocking #3550 per se. The priority can be lowered
This issue is for tracking the upstream issue. The issue on Dokka's side is #3590.