Skip to content

[K2] Use only stable compiler API #3141

@IgnatBeresnev

Description

@IgnatBeresnev

This issue is part of a larger issue: Sustainability of dependencies (#3127)

Context

As described in #3127, the K1 compiler API that Dokka relies on is not stable, and internal compiler refactorings, new features and bugfixes sometimes (unwillingly and unknowingly) have a very negative impact on Dokka. We aren't the only ones with this problem, so one of the goals of the new K2 compiler is to introduce separate API-only artifacts that would be stable and not affected by internal compiler changes.

As of Kotlin 1.9.10, this stable compiler API is still in the works, so Dokka has to depend on a bunch of artifacts with questionable stability — some required for the needed API, some for runtime only.

Goal

Dokka should, sooner or later, only rely on the stable compiler API, and all of the compiler runtime dependencies (== API implementations) should (ideally) be provided as a single or a number of artifacts with runtimeOnly scope.

This will require working with the team responsible for the compiler API to make sure that all of Dokka's use cases are covered. It will take time for that team to implement the API that Dokka needs, so this issue exists to keep track of progress.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked: AAChanges required in Analysis APIlanguage: KotlinIssue/PR related to the Kotlin language feature/analysis/docstech-debtA technical issue that is not observable by the users, but improves maintainers quality of lifetopic: K2Issues / PRs that are related to the K2 migration. See #2888upstream bugAn issue that appears due to an upstream dependency bug, such as kotlin-compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions