diff --git a/.changelog/v2.0.20-0.9.3.md b/.changelog/v2.0.20-0.9.3.md new file mode 100644 index 0000000..1dfad7a --- /dev/null +++ b/.changelog/v2.0.20-0.9.3.md @@ -0,0 +1 @@ +Kotlin version: `v2.0.20` \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/IProject.kt b/buildSrc/src/main/kotlin/IProject.kt index 8a66854..21132e1 100644 --- a/buildSrc/src/main/kotlin/IProject.kt +++ b/buildSrc/src/main/kotlin/IProject.kt @@ -10,7 +10,7 @@ object IProject : ProjectDetail() { const val HOMEPAGE = "https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin" // Remember the libs.versions.toml! - val ktVersion = "2.1.0-Beta1" + val ktVersion = "2.0.20" val pluginVersion = "0.9.3" override val version: String = "$ktVersion-$pluginVersion" diff --git a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt index eef98a7..f813d47 100644 --- a/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt +++ b/compiler/suspend-transform-plugin/src/main/kotlin/love/forte/plugin/suspendtrans/fir/SuspendTransformFirTransformer.kt @@ -36,7 +36,6 @@ import org.jetbrains.kotlin.fir.plugin.createConeType import org.jetbrains.kotlin.fir.resolve.ScopeSession import org.jetbrains.kotlin.fir.resolve.SessionHolderImpl import org.jetbrains.kotlin.fir.resolve.getSuperTypes -import org.jetbrains.kotlin.fir.resolve.toRegularClassSymbol import org.jetbrains.kotlin.fir.resolve.transformers.ReturnTypeCalculatorForFullBodyResolve import org.jetbrains.kotlin.fir.scopes.impl.FirClassDeclaredMemberScope import org.jetbrains.kotlin.fir.scopes.processAllFunctions @@ -372,7 +371,7 @@ class SuspendTransformFirTransformer( } val overriddenAnnotation = firAnnotation( - overriddenFunction, markAnnotation, overriddenFunction.getContainingClassSymbol() + overriddenFunction, markAnnotation, overriddenFunction.getContainingClassSymbol(session) ) ?: return@processOverridden val overriddenAnnoData = overriddenAnnotation.toTransformAnnotationData( @@ -501,11 +500,11 @@ class SuspendTransformFirTransformer( return if (resultConeType is ConeErrorType) { buildErrorTypeRef { diagnostic = resultConeType.diagnostic - coneType = resultConeType + type = resultConeType } } else { buildResolvedTypeRef { - coneType = resultConeType + type = resultConeType } } } @@ -564,7 +563,7 @@ class SuspendTransformFirTransformer( val copied = notCompileAnnotationsCopied.map { a -> buildAnnotation { annotationTypeRef = buildResolvedTypeRef { - coneType = a.resolvedType + type = a.resolvedType } this.typeArguments.addAll(a.typeArguments) this.argumentMapping = buildAnnotationArgumentMapping { @@ -599,7 +598,7 @@ class SuspendTransformFirTransformer( val includeAnnotation = buildAnnotation { argumentMapping = buildAnnotationArgumentMapping() annotationTypeRef = buildResolvedTypeRef { - coneType = classId.createConeType(session) + type = classId.createConeType(session) } } add(includeAnnotation) @@ -624,7 +623,7 @@ class SuspendTransformFirTransformer( val includeAnnotation = buildAnnotation { argumentMapping = buildAnnotationArgumentMapping() annotationTypeRef = buildResolvedTypeRef { - coneType = classId.createConeType(session) + type = classId.createConeType(session) } } add(includeAnnotation) diff --git a/compiler/suspend-transform-plugin/src/testData/codegen/opt.fir.ir.txt b/compiler/suspend-transform-plugin/src/testData/codegen/opt.fir.ir.txt index e8001eb..abe6702 100644 --- a/compiler/suspend-transform-plugin/src/testData/codegen/opt.fir.ir.txt +++ b/compiler/suspend-transform-plugin/src/testData/codegen/opt.fir.ir.txt @@ -102,7 +102,7 @@ FILE fqName: fileName:/Main.kt $this: GET_VAR ': .OptInTest declared in .OptInTest.runBlocking' type=.OptInTest origin=null FUN name:run visibility:public modality:FINAL <> ($this:.OptInTest) returnType:kotlin.Int [suspend] annotations: - OptIn(markerClass = [CLASS_REFERENCE 'CLASS ANNOTATION_CLASS name:OneOptAnno modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<.OneOptAnno>] type=kotlin.Array> varargElementType=kotlin.reflect.KClass) + OptIn(markerClass = [CLASS_REFERENCE 'CLASS ANNOTATION_CLASS name:OneOptAnno modality:OPEN visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass<.OneOptAnno>]) Values(target = CLASS_REFERENCE 'CLASS CLASS name:OptInTest modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.reflect.KClass<.OptInTest>) JvmBlocking(baseName = , suffix = , asProperty = ) JvmAsync(baseName = , suffix = , asProperty = ) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 22f3241..c75553d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ kotlinx-coroutines = "1.8.0" kotlinx-serialization = "1.7.1" google-auto-service = "1.0.1" # Remember the `IProject.ktVersion`! -kotlin = "2.1.0-Beta1" +kotlin = "2.0.20" [libraries] diff --git a/kotlin-js-store/yarn.lock b/kotlin-js-store/yarn.lock index 0e0fc4e..3579df8 100644 --- a/kotlin-js-store/yarn.lock +++ b/kotlin-js-store/yarn.lock @@ -1159,13 +1159,6 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -kotlin-web-helpers@2.0.0: - version "2.0.0" - resolved "https://registry.npmmirror.com/kotlin-web-helpers/-/kotlin-web-helpers-2.0.0.tgz#b112096b273c1e733e0b86560998235c09a19286" - integrity sha512-xkVGl60Ygn/zuLkDPx+oHj7jeLR7hCvoNF99nhwXMn8a3ApB4lLiC9pk4ol4NHPjyoCbvQctBqvzUcp8pkqyWw== - dependencies: - format-util "^1.0.5" - loader-runner@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" diff --git a/tests/test-js/build.gradle.kts b/tests/test-js/build.gradle.kts index d3968e2..308b3c8 100644 --- a/tests/test-js/build.gradle.kts +++ b/tests/test-js/build.gradle.kts @@ -15,7 +15,7 @@ buildscript { mavenCentral() } dependencies { - classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.1.0-Beta1-0.9.3") + classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.0.20-0.9.3") classpath("org.jetbrains.kotlin:kotlin-compiler:2.1.0-Beta1") } } diff --git a/tests/test-jvm/build.gradle.kts b/tests/test-jvm/build.gradle.kts index b16a9b9..e5a1237 100644 --- a/tests/test-jvm/build.gradle.kts +++ b/tests/test-jvm/build.gradle.kts @@ -19,7 +19,7 @@ buildscript { mavenCentral() } dependencies { - classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.1.0-Beta1-0.9.3") + classpath("love.forte.plugin.suspend-transform:suspend-transform-plugin-gradle:2.0.20-0.9.3") classpath("org.jetbrains.kotlin:kotlin-compiler:2.1.0-Beta1") } }