Multiplatform `actual` declarations are reported as `undocumented`
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
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
Thanks for the report! Have you encountered this issue on previous Dokka versions?
Probably related/blocked by #4245
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
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
@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 Yes, these issues are fixed by the new AA KDoc API
Fixed in https://github.com/Kotlin/dokka/pull/4363