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

Old versions get additional new line added #3965

Open
jeffdgr8 opened this issue Dec 19, 2024 · 3 comments · May be fixed by #3974
Open

Old versions get additional new line added #3965

jeffdgr8 opened this issue Dec 19, 2024 · 3 comments · May be fixed by #3974
Labels

Comments

@jeffdgr8
Copy link

Describe the bug
Using the versioning plugin, older version HTML files receive an extra new line whenever they're processed with :dokkaGenerate. When a project replaces the older version HTML files every time they're reprocessed when API docs are regenerated, this will continuously grow the size of these older version files.

Expected behaviour
Older version files shouldn't receive an extra new line character, only necessary changes should be made to the files.

To Reproduce
Run :dokkaGenerate on a project with older version docs and compare the processed files with the original to see the additional new line character in every HTML file.

Dokka configuration
Configuration of dokka used to reproduce the bug

dependencies {
    dokkaPlugin(libs.dokka.versioning)
}

tasks.dokkaGeneratePublicationHtml {
    dokka.pluginsConfiguration.versioning {
        olderVersionsDir = projectDir.resolve("docs/older")
        // ...
    }
}

Installation

  • Operating system: macOS
  • Build tool: Gradle v8.11.1
  • Dokka version: 2.0.0 (also 1.9.20)

Additional context
Reproducible with my library, Kotbase. Just run :dokkaGenerate and observe the Git changes. The only changes will be the additional new line characters to the older version HTML files. Every subsequent run will add an additional new line.

@jeffdgr8 jeffdgr8 added the bug label Dec 19, 2024
@whyoleg whyoleg added the runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131 label Dec 19, 2024
@adam-enko
Copy link
Member

Thanks for the report, I can observe the same behaviour when I checkout Kotbase and run it locally.

@whyoleg I don't think this is related to DGP. When I downgrade the Dokka Engine version to 1.9.20 (in dokka-convention.gradle.kts add this line: dokka.dokkaEngineVersion.set("1.9.20")) I don't see the same behaviour, so I think this is something inside Dokka Engine.

@jeffdgr8
Copy link
Author

Yes, as noted, I have experienced this behavior with both the v1 and v2 Gradle plugins. I just got around to reporting it now!

@whyoleg whyoleg added regression An issue/bug that appeared after recent changes and removed runner: gradle plugin v2 Issues fixed by Dokka Gradle Plugin v2 - see https://github.com/Kotlin/dokka/issues/3131 regression An issue/bug that appeared after recent changes labels Dec 20, 2024
@jeffdgr8
Copy link
Author

Fixed in #3974

jeffdgr8 added a commit to jeffdgr8/kotbase that referenced this issue Dec 28, 2024
jeffdgr8 added a commit to jeffdgr8/kotbase that referenced this issue Dec 28, 2024
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