Skip to content

Conversation

Mr3zee
Copy link
Member

@Mr3zee Mr3zee commented May 7, 2025

Subsystem
Compiler Plugin

Problem Description
2.2.0 Kotlin brings a lot of changes in compiler API.

Solution
Using 2.2.0-Beta1 version perform the migration

@Mr3zee Mr3zee requested a review from e5l May 7, 2025 11:30
@Mr3zee Mr3zee self-assigned this May 7, 2025
@Mr3zee Mr3zee added the housekeeping Some miscellaneous code base changes, tests, etc. label May 7, 2025
@Mr3zee Mr3zee force-pushed the 2.2.0-compiler-migration branch 2 times, most recently from e9a38b6 to 33f5ff2 Compare May 7, 2025 13:30
@Mr3zee Mr3zee force-pushed the 2.2.0-compiler-migration branch from 33f5ff2 to 0761ddd Compare May 7, 2025 13:38
@e5l e5l requested a review from Copilot May 8, 2025 06:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the compiler plugin to support Kotlin 2.2.0-Beta1 by updating API usages and introducing new version‐specific helper methods via the vsApi mechanism. The key changes include adapting symbol and declaration retrieval methods, refactoring checker implementations to use object declarations and VS suffixes, and updating the IR code generation in the backend.

Reviewed Changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
compiler-plugin/compiler-plugin-k2/src/main/latest/kotlinx/rpc/codegen/FirVersionSpecificApiImpl.kt Adds new VS-specific API functions for declaration and function retrieval.
compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/serialization/annotation.kt Updates annotation constructor resolution to conform to new vsApi calls.
compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/*.kt Refactors checkers to use object declarations and VS-specific methods.
compiler-plugin/compiler-plugin-backend/** Updates several VersionSpecificApiImpl and IR generation files to use new vsApi patterns.
compiler-plugin/compiler-plugin-k2/build.gradle.kts Replaces context receiver enabling with context parameter checks for Kotlin 2.2.0+
Comments suppressed due to low confidence (1)

compiler-plugin/compiler-plugin-backend/src/main/core/kotlinx/rpc/codegen/extension/RpcStubGenerator.kt:1484

  • [nitpick] Since several similar vsApi blocks are used to assign dispatchReceiverParameterVS, consider abstracting this assignment into a helper function to reduce repetition and improve clarity.
vsApi { dispatchReceiverParameterVS = it }

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.

lgtm, please check minor comments

@Mr3zee Mr3zee merged commit eaaba79 into main May 8, 2025
1 check passed
@Mr3zee Mr3zee deleted the 2.2.0-compiler-migration branch May 8, 2025 07:55
Mr3zee added a commit that referenced this pull request Jun 11, 2025
(cherry picked from commit eaaba79)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Some miscellaneous code base changes, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants