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

[K2] Support KMP projects #3137

Open
10 of 12 tasks
vmishenev opened this issue Aug 21, 2023 · 5 comments
Open
10 of 12 tasks

[K2] Support KMP projects #3137

vmishenev opened this issue Aug 21, 2023 · 5 comments
Assignees
Labels
language: Kotlin Issue/PR related to the Kotlin language feature/analysis/docs topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Milestone

Comments

@vmishenev
Copy link
Member

vmishenev commented Aug 21, 2023

This issue is part of a larger issue: Migrate Dokka's analysis to K2 compiler (#2888).

Goal

Dokka should be able to generate documentation for all Kotlin Multiplatform projects.

That includes, but not limited to:

  • Projects that use 3rd party klib libraries.
  • Projects that use platform/native types provided by Kotlin by default (like CVariable)
  • Projects that use cintrop to generate bindings for an arbitrary local library.
  • Projects that have non-stable targets such as Kotlin/Wasm.

The documentation generated for such projects by K1 and K2 analyses should not have significant and breaking differences.

Sub-tasks

Upstream issues

@vmishenev vmishenev added the bug label Aug 21, 2023
@IgnatBeresnev IgnatBeresnev changed the title Support MPP in K2 [K2] Support KMP projects Aug 24, 2023
@IgnatBeresnev IgnatBeresnev added this to the K2 compiler analysis milestone Aug 24, 2023
@IgnatBeresnev IgnatBeresnev added language: Kotlin Issue/PR related to the Kotlin language feature/analysis/docs and removed bug labels Aug 24, 2023
@IgnatBeresnev
Copy link
Member

Current status

The analysis of multiplatform (.klib ) libraries cannot be implemented due to the needed K2 API being only partially implemented.

Blocking issue: KT-61371 - Analysis API standalone: register compiler symbol provider for libraries in standalone mode

Blocking issue's due date: around the release of Kotlin 1.9.20. It's unlikely that the fix we need will be part of Kotlin 1.9.20 itself, but it should be out at around that time, so we'll likely have to depend on a -dev artifact of either 1.9.20 (if it's backported into a custom branch) or of whatever the next version is going to be.

@IgnatBeresnev
Copy link
Member

KT-61371 has been implemented and merged into Kotlin, but there are more issues to be addressed, so we are still blocked.

@vmishenev
Copy link
Member Author

After KT-61371 is fixed, KT-62244 should be addressed.

@IgnatBeresnev IgnatBeresnev added the topic: K2 Issues / PRs that are related to the K2 migration. See #2888 label Oct 13, 2023
@IgnatBeresnev IgnatBeresnev removed this from the K2 compiler analysis milestone Oct 13, 2023
@vmishenev
Copy link
Member Author

KT-62244 is fixed, but new issues have been discovered.
The meta issue for them is KT-62696

@IgnatBeresnev IgnatBeresnev added the upstream bug An issue that appears due to an upstream dependency bug, such as kotlin-compiler label Dec 12, 2023
@IgnatBeresnev IgnatBeresnev added this to the Dokka 2.1.0 milestone Dec 12, 2023
@IgnatBeresnev IgnatBeresnev removed the upstream bug An issue that appears due to an upstream dependency bug, such as kotlin-compiler label Dec 12, 2023
@IgnatBeresnev
Copy link
Member

Current status

Since a number of upstream blocking issues were fixed, Dokka is now able to generate documentation for a subset of KMP projects, albeit with limitations and bugs.

While regression testing Kotlin/JVM projects for #3140, we were able to spend some time on testing KMP projects, and found issues that we weren't aware of before. I've updated the subtasks of this issue based on the findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language: Kotlin Issue/PR related to the Kotlin language feature/analysis/docs topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Projects
None yet
Development

No branches or pull requests

2 participants