Kotlin / dokka

API documentation engine for Kotlin

Home Page:https://kotl.in/dokka

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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.