Kotlin / dokka

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

[K2] KMP: Support Wasm platform fully #3636

Open vmishenev opened 6 months ago

vmishenev commented 6 months ago

Currently, Kotlin Wasm is Alpha. Dokka analyzes it as JS platform. Dokka K1 does the same.

It is blocked by https://youtrack.jetbrains.com/issue/KT-64984/Analysis-API-Support-Wasm-target (needs a LLFirAbstractSessionFactory implementation)

Testing: ?? WasmJsWasiGradleIntegrationTest will be passes if here https://github.com/Kotlin/dokka/blob/8e5c63d035ef44a269b8c43430f43f5c8eebfb63/dokka-integration-tests/gradle/projects/it-wasm-js-wasi-basic/src/wasmJsMain/kotlin/RootPackageClass.kt#L20 we remove AnchorHTMLAttributes (no import for it) In Dokka K1 AnchorHTMLAttributes is just omitted

Parent: #3137

vmishenev commented 5 months ago

We can analyze Wasm as JS platform if Dokka passes all dependencies. However, it depends on the internals/implementation of Analysis API. Currently, it works. After https://youtrack.jetbrains.com/issue/KT-64984/Analysis-API-Support-Wasm-target, it would be better to use the analysis for the Wasm platform.

whyoleg commented 2 months ago

@vmishenev Probably this issue should not be closed. Upstream issue in AA was fixed and we now can fix it on our side.