dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Multiplatform `actual` declarations are reported as `undocumented`

Open BenWoodworth opened this issue 1 month ago • 5 comments

Describe the bug Multiplatform actual class/companion/property/etc. declarations are reported as undocumented, even though they aren't reported for the expect in the common source set.

Expected behaviour If a declaration isn't reported on the expect declaration, it also shouldn't be reported on the actual declaration.

Screenshots

View Screenshots

All have documentation in common, with Companion and message having @suppress Image Image Image Image

To Reproduce Example project: https://github.com/BenWoodworth/parameterize/blob/2498f5d269586d2cdd7b6568ed4e51c5c94721a2/parameterize-core/src/commonMain/kotlin/ParameterizeFailedError.kt#L34-L34

Run: ./gradlew clean :parameterize-core:dokkaGenerate

Dokka configuration

dokka-conventions.gradle.kts parameterize-core/build.gradle.kts

Installation

  • Operating system: Linux
  • Build tool: Gradle v8.14
  • Dokka version: 2.1.0

BenWoodworth avatar Nov 15 '25 04:11 BenWoodworth

Thanks for the report! Have you encountered this issue on previous Dokka versions?

Probably related/blocked by #4245

whyoleg avatar Nov 17 '25 16:11 whyoleg

Hey! I wasn't getting any warnings previously. I only started seeing this after updating some of my dependencies.

I just went back in to see when it started, and it looks like this might actually be two separate issues.

Kotlin 2.2.20 seems to introduce the first two warnings (undocumented on the class, but just for js and wasmJs). And Dokka 2.0.0 seems to introduce the last 10 warnings (undocumented for just the members)


Kotlin 2.2.10, Dokka 1.9.20: No warnings

Kotlin 2.2.20, Dokka 1.9.20:

Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/ (js)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/ (wasmJs)

Kotlin 2.2.10, Dokka 2.0.0 (no migration. only changing the version):

Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/message/#/ (js)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/message/#/ (jvm)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/message/#/ (native)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/message/#/ (wasmJs)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/message/#/ (wasmWasi)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError.Companion/ (js)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError.Companion/ (jvm)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError.Companion/ (native)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError.Companion/ (wasmJs)
Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError.Companion/ (wasmWasi)

Kotlin 2.2.20, Dokka 2.0.0: all 12 warnings from above

BenWoodworth avatar Nov 17 '25 18:11 BenWoodworth

Actually, it looks like the 2nd issue has to do with the docs being @suppress

If I remove @suppress from the message/companion docs, that resolves most of the warnings:

w: [:parameterize-core:dokkaGeneratePublicationHtml] Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/ (js)
w: [:parameterize-core:dokkaGeneratePublicationHtml] Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/ (wasmJs)
w: [:parameterize-core:dokkaGeneratePublicationHtml] Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/message/#/ (js)
w: [:parameterize-core:dokkaGeneratePublicationHtml] Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError/message/#/ (wasmJs)
w: [:parameterize-core:dokkaGeneratePublicationHtml] Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError.Companion/ (js)
w: [:parameterize-core:dokkaGeneratePublicationHtml] Undocumented: com.benwoodworth.parameterize/ParameterizeFailedError.Companion/ (wasmJs)

And that leaves just the first issue with the js targets

BenWoodworth avatar Nov 17 '25 18:11 BenWoodworth

@AbdullinAM, could you take a look at the issue here? It seems to me that after migrating to the AA KDoc API, this issue should no longer exist.

whyoleg avatar Nov 21 '25 13:11 whyoleg

@whyoleg Yes, these issues are fixed by the new AA KDoc API

AbdullinAM avatar Nov 21 '25 14:11 AbdullinAM

Fixed in https://github.com/Kotlin/dokka/pull/4363

whyoleg avatar Dec 19 '25 16:12 whyoleg