dokka icon indicating copy to clipboard operation
dokka copied to clipboard

[K2] Unstable documentable order

Open vmishenev opened this issue 1 year ago • 8 comments

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.

vmishenev avatar Oct 25 '23 13:10 vmishenev

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

IgnatBeresnev avatar Nov 20 '23 12:11 IgnatBeresnev

It's unclear what order we want to have in Dokka, by alphabet or as in code. First need to decide the product part.

IgnatBeresnev avatar Dec 15 '23 13:12 IgnatBeresnev

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.

IgnatBeresnev avatar Dec 20 '23 11:12 IgnatBeresnev

It also affects a KDoc link of overload. See tests in #3447 But it is still user-invisible.

vmishenev avatar Jan 19 '24 09:01 vmishenev

I have created KT-65110 to have a stable order internally.

vmishenev avatar Jan 19 '24 10:01 vmishenev

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.

IgnatBeresnev avatar Apr 05 '24 10:04 IgnatBeresnev