Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.34k stars 396 forks source link

[K2] Unstable documentable order #3250

Open vmishenev opened 8 months ago

vmishenev commented 8 months ago

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.

IgnatBeresnev commented 7 months ago

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 commented 6 months ago

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 commented 6 months ago

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.

vmishenev commented 5 months ago

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

vmishenev commented 5 months ago

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

IgnatBeresnev commented 3 months ago

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.