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

KMP: References is not linked if they are in shared code and there is an intermediate level between them #3382

Open
atyrin opened this issue Nov 28, 2023 · 1 comment
Labels

Comments

@atyrin
Copy link
Contributor

atyrin commented Nov 28, 2023

Create a KMP library with KGP 1.9.20. Declare 2 ios targets. That is required for generating a few layers of shared native source sets

// commonMain
class Dokka

// iosMain
class IosDokka

// iosX64Main

/**
 * Ths fun consume [Dokka] and [IosDokka]
 */
fun consumeDokka(d: Dokka, iosD: IosDokka) {}

References to commonMain will not have a links
image

Installation

  • Dokka version: 1.9.20

Related issue for K2: #3377. Probably, it is even a duplicate.

@atyrin atyrin added the bug label Nov 28, 2023
@fAntel
Copy link

fAntel commented May 17, 2024

I have the same issue and there is one more case. Documentation from common isn't inherited in ios. If you have an interface or smth. in common source set and implementation in ios source set there would be no documentation for overridden methods and there even would be uncodument warning for them. For example:

// commonMain
/** Common interface */
interface Dokka {
    /** Method to implement */
    fun foo()
}

// iosMain
class IosDokka private constructor() : Dokka {
    override fun foo() {}
}

// jvmMain
class JvmDokka private constructor() : Dokka {
    override fun foo() {}
}
Undocumented: com.example/IosDokka/ (ios)
Undocumented: com.example/IosDokka/foo/#/ (ios)
Undocumented: com.example/JvmDokka/ (jvm)

No link for common class and no documentation for overridden method in for iosMain
image

Works fine for jvmMain
image

UPD Looked more closely. I have the same issue for other native targets too (linux, mingw, macos).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants