Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ilya-g opened this issue May 27, 2024 · 0 comments · Fixed by #3662
Closed

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

ilya-g opened this issue May 27, 2024 · 0 comments · Fixed by #3662
Assignees
Labels
bug feedback: Kotlin libs Feedback from Kotlin's internal libraries topic: stdlib migration An issue/PR related to the migration of stdlib's API reference to modern Dokka

Comments

@ilya-g
Copy link
Member

ilya-g commented May 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feedback: Kotlin libs Feedback from Kotlin's internal libraries topic: stdlib migration An issue/PR related to the migration of stdlib's API reference to modern Dokka
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants