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

Open
vmishenev opened this issue Oct 25, 2023 · 6 comments
Open

[K2] Unstable documentable order #3250

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

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.

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

No branches or pull requests

2 participants