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

Unstable sort order for overloaded member functions #1333

Closed
arturbosch opened this issue Aug 17, 2020 · 1 comment · Fixed by #1394
Closed

Unstable sort order for overloaded member functions #1333

arturbosch opened this issue Aug 17, 2020 · 1 comment · Fixed by #1394
Assignees
Labels
Milestone

Comments

@arturbosch
Copy link

arturbosch commented Aug 17, 2020

Describe the bug
Hi, on CI we verify if the documentation gets generated correctly and is uptodate when creating PRs.
The code in the Screenshots section, generates files which are unstable for version control because the order changes on each dokka invocation.

Expected behaviour
Documentation generation should be stable for version control.

Screenshots

It is the following code:

https://github.com/detekt/detekt/blob/c6ff7112b0b33afdf62e043075d67508c9e1e5b9/detekt-api/src/main/kotlin/io/gitlab/arturbosch/detekt/api/Context.kt#L13-L45

2020-08-17-202736_1913x435_scrot

To Reproduce

  1. git clone https://github.com/detekt/detekt
  2. git checkout -b "try-dokka-1.4" "origin/try-dokka-1.4"
  3. gradle generateDocumentation --rerun-tasks 2x

Dokka configuration

tasks.withType<DokkaTask>().configureEach {
    outputDirectory = "$rootDir/docs/pages/kdoc"
}

Installation

  • Operating system: Linux
  • Build tool: Gradle v6.6.0
  • Dokka version: 1.4.0-rc

Additional context
We are upgrading to Kotlin 1.4 and want to upgrade dokka.
Old dokka does not allow us to upgrade Gradle because it throws an OOM exception for Gradle > 6.5 on Java 11.

@kamildoleglo
Copy link
Contributor

kamildoleglo commented Aug 17, 2020

Hi! Could you please try to use the newest dokka version (1.4.0-rc is published to the jcenter)? It should allow you to generate the documentation correctly preserving order. It also supports Kotlin 1.4

The OOM error is easily fixable in Gradle by adding more memory (eg. you can put org.gradle.jvmargs=-Xmx4096m in your gradle.properties file)

[EDIT]: Sorry, I just saw your edit that you use the newest version and not the 0.10.0 as you mentioned before. We'll look into that. The latter part of this response still holds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants