Public actual declarations are not shown in docs if expect is internal
ilya-g opened this issue · comments
Describe the bug
// common source set
internal expect fun foo() {}
// actual platform 1 (e.g. Native)
/** foo docs */
public actual fun foo() {}
// actual platform 2 (e.g. Wasm)
internal actual fun foo() {}
Actualizing an internal expect declaration with a public actual declarations is allowed in KMP (at least for functions, but we use it for classifiers as well in stdlib). However if such an internal expect declaration is introduced, its public actual counterparts are no longer shown in documentation.
Expected behavior
Public actual declarations should continue being rendered for individual platforms as if there's no expect declared.
To Reproduce
Kotlin branch: rr/stdlib/docs-internal-expect-public-actual
Docs build: https://buildserver.labs.intellij.net/buildConfiguration/Kotlin_KotlinDev_LibraryReferenceLatestDocs/509723400?buildTab=artifacts
Example declaration: kotlin.system.exitProcess
- before introducing expect: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.system/exit-process.html
- after introducing expect: https://buildserver-artifacts.labs.intellij.net/presignedTokenAuth/1002a5ef-c5bb-4488-b578-9156ba6e24bd/repository/download/Kotlin_KotlinDev_LibraryReferenceLatestDocs/509723400:id/latest-version.zip!/all-libs/kotlin-stdlib/kotlin.system/index.html
Installation
- Operating system: macOS/Windows/Linux
- Build tool: Gradle v7.6
- Dokka version: 2.0.20-dev-334
Context
We need to use internal expects for public declarations for proper K2 stdlib compilation of the code shared between Native and Wasm.