-
Notifications
You must be signed in to change notification settings - Fork 30
Fix kotlin master builds #345
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
Conversation
There was a problem hiding this 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 adapts the codebase to Kotlin 2.2.0 changes by updating the diagnostics API and introducing a new v_2_2_2 source set to distinguish between different Kotlin versions.
- Updated several diagnostic checker classes and APIs under the new v_2_2_2 source set.
- Refactored the registration of diagnostic renderer factories to use an overridden getRendererFactoryVs() method instead of static init blocks.
- Harmonized version-specific API implementations and adjusted import statements.
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
compiler-plugin/compiler-plugin-k2/src/main/v_2_2_2/kotlinx/rpc/codegen/checkers/FirRpcCheckersVS.kt | Introduces updated checker classes using new context receiver syntax. |
compiler-plugin/compiler-plugin-k2/src/main/v_2_2_2/kotlinx/rpc/codegen/FirVersionSpecificApiImpl.kt | Implements version‑specific APIs using updated extension properties. |
compiler-plugin/compiler-plugin-k2/src/main/v_2_2_2/kotlinx/rpc/codegen/FirRpcSupertypeGenerator.kt | Adapts the supertype generator logic for additional supertypes. |
Various diagnostics files under v_2_2, pre_2_0_21, pre_2_0_10, and latest | Update diagnostic container classes, renderer factory registration, and diagnostic factories. |
compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/checkers/diagnostics/… | Refactors diagnostic API registration to override getRendererFactoryVs(). |
compiler-plugin/compiler-plugin-k2/src/main/core/kotlinx/rpc/codegen/FirVersionSpecificApi.kt | Cleans up unused imports to align with new Kotlin version changes. |
@@ -35,13 +35,13 @@ object FirRpcDiagnostics { | |||
val TYPE_PARAMETERS_IN_RPC_FUNCTION by error0<KtElement>(SourceElementPositioningStrategies.TYPE_PARAMETERS_LIST) | |||
val TYPE_PARAMETERS_IN_RPC_INTERFACE by error0<KtElement>(SourceElementPositioningStrategies.TYPE_PARAMETERS_LIST) | |||
|
|||
init { | |||
RootDiagnosticRendererFactory.registerFactory(RpcDiagnosticRendererFactory) | |||
override fun getRendererFactoryVs(): BaseDiagnosticRendererFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider adding a comment to explain the transition from using an init block for factory registration to the overridden getRendererFactoryVs() approach to aid future maintainers.
Copilot uses AI. Check for mistakes.
@@ -0,0 +1,60 @@ | |||
/* | |||
* Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider standardizing the copyright year across files (e.g., updating to 2023-2025) for consistency.
Copilot uses AI. Check for mistakes.
(cherry picked from commit 700fad1)
Subsystem
Compiler plugin, Gradle
Problem Description
Kotlin 2.2.0 brings yet another changes
Solution