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] Migrate to new Standalone Analysis API #3114

Closed
Tracked by #3137
vmishenev opened this issue Aug 12, 2023 · 1 comment · Fixed by #3201
Closed
Tracked by #3137

[K2] Migrate to new Standalone Analysis API #3114

vmishenev opened this issue Aug 12, 2023 · 1 comment · Fixed by #3201
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 12, 2023

This issue is a requirement for


It depends on KT-60884
The current Standalone API is a prototype. It doesn't allow to migrate to compiler 1.9.20 due to the impossibility of creating GlobalSearchScope (contentScope.).

Also, it should unmute tests using JDK.

@vmishenev vmishenev added the bug label Aug 12, 2023
@vmishenev vmishenev self-assigned this Aug 12, 2023
@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Aug 16, 2023

Background

There are tools and libraries that need to work with Kotlin source code, be it for analysis, modifications or something else. Among examples are Dokka, KSP and IDEs. However, different tools need different levels of information and capabilities, as some might be more sophisticated (IDEs), while others only require the basic information (Dokka, KSP).

The Standalone Analysis API is a very fast, lightweight alternative to the heavy API for IDEs, which should work nicely with Dokka. The Standalone API should also be more stable as it is more generic and has more 3rd party clients than the IDE APIs, which can help Dokka with stability issues.

Issue discussion summary:

We are blocked by KT-60884, because without it we cannot configure the user projects fully and correctly:

  • There are problems with setting up JDKs: at the moment JDK 8 is not supported, but it works with JDK 11 for some reason.
  • Projects that have external JVM dependencies (i.e they use 3rd party libraries) are not guaranteed to work correctly - some do, some don't.

If put in perspective, it is similar to environment configuration in K1 analysis, which uses a combination of compiler and IDE settings. The Standalone API should replace all of it in K2.

Estimated time of implementing this issue: ~2 weeks

@IgnatBeresnev IgnatBeresnev added this to the Migration to the K2 compiler 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 IgnatBeresnev changed the title Migrate to new Standalone Analysis API [K2] Migrate to new Standalone Analysis API Aug 24, 2023
@vmishenev vmishenev linked a pull request Aug 31, 2023 that will close this issue
@vmishenev vmishenev linked a pull request Oct 11, 2023 that will close this issue
@IgnatBeresnev IgnatBeresnev modified the milestones: K2 compiler analysis, Dokka 1.9.20 Oct 12, 2023
@IgnatBeresnev IgnatBeresnev added the topic: K2 Issues / PRs that are related to the K2 migration. See #2888 label Oct 13, 2023
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

Successfully merging a pull request may close this issue.

2 participants