Skip to content
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

[K2] Unstable documentable order #3250

Closed
vmishenev opened this issue Oct 25, 2023 · 8 comments · Fixed by #3943
Closed

[K2] Unstable documentable order #3250

vmishenev opened this issue Oct 25, 2023 · 8 comments · Fixed by #3943
Assignees
Labels
bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Milestone

Comments

@vmishenev
Copy link
Member

vmishenev commented Oct 25, 2023

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 vmishenev added bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888 labels Oct 25, 2023
@IgnatBeresnev IgnatBeresnev changed the title [K2] Order of packages is unstable [K2] Order documentable order Nov 20, 2023
@IgnatBeresnev IgnatBeresnev changed the title [K2] Order documentable order [K2] Unstable documentable order Nov 20, 2023
@IgnatBeresnev
Copy link
Member

The order of functions also seems to be unstable compared to K1. This test reproduces it:

// TODO #3250 address unstable order
val functions = pckg.functions.sortedBy { it.name }
val firstFunction = functions[0]
assertEquals("bar", firstFunction.name)
val secondFunction = functions[1]
assertEquals("foo", secondFunction.name)

@IgnatBeresnev
Copy link
Member

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
Copy link
Member

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
Copy link
Member Author

vmishenev commented Jan 19, 2024

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

@vmishenev
Copy link
Member Author

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

@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Apr 5, 2024

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.

@whyoleg whyoleg added the blocked: AA Changes required in Analysis API label Aug 23, 2024
@whyoleg
Copy link
Collaborator

whyoleg commented Aug 23, 2024

Action point:

  • try to fix it on AA side ourselves

@whyoleg whyoleg added this to the Dokka 2.0.0 milestone Aug 23, 2024
@vmishenev vmishenev self-assigned this Aug 30, 2024
@vmishenev
Copy link
Member Author

Just for the record, the unit test two classes from different packages passes on only Windows, but not on Linux/Mac.
https://github.com/Kotlin/dokka/actions/runs/10633139023
image

@vmishenev vmishenev removed the blocked: AA Changes required in Analysis API label Sep 23, 2024
@vmishenev vmishenev linked a pull request Nov 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants