Skip to content

Public actual declarations are not shown in docs if expect is internal #3633

@ilya-g

Description

@ilya-g

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.

Metadata

Metadata

Assignees

Labels

bugfeedback: Kotlin libsFeedback from Kotlin's internal librariestopic: stdlib migrationAn issue/PR related to the migration of stdlib's API reference to modern Dokka

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions