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] Stabilize pure Kotlin/JVM and mixed Kotlin/Java projects #3140

Open
23 of 31 tasks
IgnatBeresnev opened this issue Aug 24, 2023 · 2 comments
Open
23 of 31 tasks

[K2] Stabilize pure Kotlin/JVM and mixed Kotlin/Java projects #3140

IgnatBeresnev opened this issue Aug 24, 2023 · 2 comments
Assignees
Labels
language: Java Issue/PR related to the Java language feature/analysis/docs 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

@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Aug 24, 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 any pure Kotlin/JVM project, or any project that uses a mix of Kotlin and Java together.

That means, it has to work with:

  • All JVM versions officially supported by Kotlin. Running on Java 8, 11 and 17 should produce the same result.
  • Projects that use pure Java and/or JVM-only Kotlin libraries (KMP libraries fall outside of the scope, they should be addressed in [K2] Support KMP projects #3137). All user-visible types must be resolved correctly, including external documentation links.
  • Projects that only use Kotlin's standard library and/or Java SE API directly (declarations from java.lang, java.util and similar packages).
  • Dokka's JVM-only Javadoc format.

Once done, we should be able to turn on the K2 analysis by default for all JVM-only user projects.

Due date

The K2 analysis should be used by default in all JVM-only user projects in Dokka 2.0.0, with the ability to fall back to K1.

If there are unresolved issues or bugs by that time, at the very least it should be available for early testing (i.e toggleable via a flag).

Sub-tasks

Upstream issues

@IgnatBeresnev IgnatBeresnev added language: Java Issue/PR related to the Java language feature/analysis/docs language: Kotlin Issue/PR related to the Kotlin language feature/analysis/docs labels Aug 24, 2023
@IgnatBeresnev IgnatBeresnev added this to the Migration to the K2 compiler milestone Aug 24, 2023
@IgnatBeresnev
Copy link
Member Author

IgnatBeresnev commented Aug 24, 2023

Current status

We are unable to properly configure K2 analysis for JVM projects due to missing API in K2.

Blocking issue: KT-60884 - Analysis API: Improve standalone mode project model creation.

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.

Notes: it might be possible to fix this issue on Dokka's side without the need to wait for KT-60884, but the solution is not guaranteed to be trivial or stable, so it's preferable to avoid it and wait for the proper API to be added.

@IgnatBeresnev IgnatBeresnev added the topic: K2 Issues / PRs that are related to the K2 migration. See #2888 label Oct 13, 2023
@IgnatBeresnev IgnatBeresnev modified the milestones: K2 compiler analysis, Dokka 1.9.20 Oct 13, 2023
@IgnatBeresnev
Copy link
Member Author

IgnatBeresnev commented Dec 12, 2023

Current status

The blocking Analysis API issue was addressed, and we were able to proceed with stabilizing Kotlin/JVM projects.

Having fixed the major bugs we were aware of, we prepared the testing infrastructure and started manually testing Dokka on a variety of user projects, a considerable number of which were Kotlin/JVM projects. More details and results here: #3328

Based on the testing results and findings, I've updated the subtasks of this issue with the new issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language: Java Issue/PR related to the Java language feature/analysis/docs 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