Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.41k stars 405 forks source link

[K2] KMP: Unresolved declarations from another module in Android + JVM project #3702

Open atyrin opened 2 months ago

atyrin commented 2 months ago
  1. Create a project with 2 KMP module (android + jvm + any other target)

  2. In Module1 declare a type e.g.

    object Firebase
  3. In Module2 declare two functions: one in the Android source set, another in the JVM source set that uses Firebase object. Two of them because I assume that the selected target may change

With K1 the extension page will have all platforms

image

K2:

image

dokka-repros.zip

vmishenev commented 2 months ago

Reproducer: https://github.com/Kotlin/dokka/commit/18e2b6092eb3e1c5cfbc0acf8c19d35685d93737 This is blocked by https://youtrack.jetbrains.com/issue/KT-70384/Analysis-API-Standalone-The-same-class-in-the-same-two-renamed-jars-is-unresolved


Theoretically having classes with the same FQN in different jars is enough to reproduce it.

whyoleg commented 3 weeks ago

fixed in upstream: published in 2.1.0-dev-6739