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

Add the ability to switch between K1 and K2 analysis for testing #3113

Closed
IgnatBeresnev opened this issue Aug 11, 2023 · 2 comments
Closed
Assignees
Labels
topic: K2 Issues / PRs that are related to the K2 migration. See #2888
Milestone

Comments

@IgnatBeresnev
Copy link
Member

The refactoring introduced in #3034 allows Dokka to use either K1 or K2 compiler for analysing Kotlin projects.

The ability to switch between K1 and K2 should be added, so that we can start regression testing on a wider range of projects.


Blocked by: #3094

@vmishenev vmishenev assigned vmishenev and unassigned vmishenev Aug 12, 2023
@IgnatBeresnev
Copy link
Member Author

IgnatBeresnev commented Aug 16, 2023

Discussion summary:

  • The switch will be used for testing purposes only; A user-facing switch will be added separately and once K2 is stable enough for people to try.
  • A single Gradle property is preferred (if possible), or some other way to dynamically change the analysis implementation without having to re-build Dokka.
  • The switch should be toggleable in tests (i.e we should be run unit and integration tests in CI with K1/K2);
    • Setting up unit and integration tests to use the switch falls outside of the scope of this issue.
  • The switch should indicate that it's an internal tool/API: internal in the name/path, or maybe even a warning printed to the logs.

Additional notes:

  • Projects that are using K2-only features might fail when K1 is enabled.
  • If K2 analysis is enabled, and the user project is still using K1, it should not interfere or cause any problems. Same principle applies vice versa.

@IgnatBeresnev IgnatBeresnev added this to the K2 compiler analysis milestone Aug 24, 2023
@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

Implemented in #3152

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

No branches or pull requests

2 participants