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

KRPC-18 Add K2 and IR code generation plugins, preserve KSP for K1 #105

Merged
merged 17 commits into from
Aug 15, 2024

Conversation

Mr3zee
Copy link
Collaborator

@Mr3zee Mr3zee commented Jun 19, 2024

Adds support for K2 code generation. Uses K2 compiler plugin instead of KSP.
Backend Compiler Plugin now generates most of the code, FIR plugin for K2 and KSP for K1 only generate minimal declarations needed for Serialization and metadata generation on the frontend.

This is a meta-PR that accumulated many other PRs, see corresponding commits and PR descriptions.

@Mr3zee Mr3zee self-assigned this Jun 19, 2024
@Mr3zee Mr3zee force-pushed the compiler-plugin branch 3 times, most recently from ad99de0 to 28bf0b9 Compare June 24, 2024 17:58
@efemoney
Copy link

efemoney commented Jul 9, 2024

Curious, is there more information on this change? Motivation, effect, etc

@Mr3zee
Copy link
Collaborator Author

Mr3zee commented Jul 15, 2024

@efemoney basically these reasons:

  • KSP Gradle plugin needs to be added explicitly by the user, that's a friction in UX
  • KSP does not support Gradle configuration caches
  • KSP exposes generated code, which we often don't want to do to keep the sources clean
  • KSP does not allow for existing code modifications, so we need a compiler plugin anyway
  • K2 frontend compiler plugins will allow for IDE integration for generated declarations in future, so we might make use of it too

@efemoney
Copy link

Makes sense! Thanks

@Mr3zee Mr3zee changed the title Replace KSP with Compiler Plugins Added K2 and IR code generation plugins, preserve KSP for K1 Aug 13, 2024
@Mr3zee Mr3zee changed the title Added K2 and IR code generation plugins, preserve KSP for K1 Add K2 and IR code generation plugins, preserve KSP for K1 Aug 13, 2024
@Mr3zee Mr3zee force-pushed the compiler-plugin branch 2 times, most recently from 99261fc to c322248 Compare August 14, 2024 10:46
@Mr3zee Mr3zee requested a review from e5l August 14, 2024 10:48
@Mr3zee Mr3zee marked this pull request as ready for review August 14, 2024 10:49
@Mr3zee Mr3zee linked an issue Aug 14, 2024 that may be closed by this pull request
- apiDump
- Fix compilation for older Kotlin compiler plugins
- Fix configs for tests and yarn.lock
- Disable KSP plugin for local tests
- Added 100000 requests test (checks for possible memory leaks)
Copy link
Member

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Good job! It also would be great to mention YT ticket in the header and update description

@Mr3zee
Copy link
Collaborator Author

Mr3zee commented Aug 14, 2024

@e5l thank you! Yes, forgot to do it, well do soon

@Mr3zee Mr3zee changed the title Add K2 and IR code generation plugins, preserve KSP for K1 KRPC-18 Add K2 and IR code generation plugins, preserve KSP for K1 Aug 15, 2024
@Mr3zee Mr3zee merged commit d1c833f into main Aug 15, 2024
5 checks passed
@Mr3zee Mr3zee deleted the compiler-plugin branch August 15, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kotlin 2.0.0 support :)
3 participants