Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/v2.3.0-0.13.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kotlin version: `v2.3.0`
1 change: 1 addition & 0 deletions .changelog/v2.3.0-Beta1-0.13.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kotlin version: `v2.3.0-Beta1`
1 change: 1 addition & 0 deletions .changelog/v2.3.0-RC-0.13.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kotlin version: `v2.3.0-RC`
1 change: 1 addition & 0 deletions .changelog/v2.3.0-RC2-0.13.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kotlin version: `v2.3.0-RC2`
1 change: 1 addition & 0 deletions .changelog/v2.3.0-RC3-0.13.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kotlin version: `v2.3.0-RC3`
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/IProject.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ object IProject : ProjectDetail() {
const val HOMEPAGE = "https://github.com/ForteScarlet/kotlin-suspend-transform-compiler-plugin"

// Remember the libs.versions.toml!
val ktVersion = "2.2.21"
val ktVersion = "2.3.0"
val pluginVersion = "0.13.2"

override val version: String = "$ktVersion-$pluginVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

package love.forte.plugin.suspendtrans

import BuildConfig
import love.forte.plugin.suspendtrans.configuration.InternalSuspendTransformConfigurationApi
import love.forte.plugin.suspendtrans.configuration.SuspendTransformConfiguration
import love.forte.plugin.suspendtrans.fir.SuspendTransformFirExtensionRegistrar
Expand All @@ -37,6 +38,8 @@ import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension
@OptIn(ExperimentalCompilerApi::class)
class SuspendTransformComponentRegistrar : CompilerPluginRegistrar() {

override val pluginId: String = BuildConfig.KOTLIN_PLUGIN_ID

//internal var defaultConfiguration: SuspendTransformConfiguration? = null

override val supportsK2: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import org.jetbrains.kotlin.fakeElement
import org.jetbrains.kotlin.fir.*
import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
import org.jetbrains.kotlin.fir.analysis.checkers.context.MutableCheckerContext
import org.jetbrains.kotlin.fir.analysis.checkers.getContainingClassSymbol
import org.jetbrains.kotlin.fir.analysis.checkers.processOverriddenFunctionsSafe
import org.jetbrains.kotlin.fir.caches.FirCache
import org.jetbrains.kotlin.fir.caches.firCachesFactory
Expand All @@ -59,12 +58,9 @@ import org.jetbrains.kotlin.fir.plugin.createConeType
import org.jetbrains.kotlin.fir.references.builder.buildExplicitThisReference
import org.jetbrains.kotlin.fir.references.builder.buildImplicitThisReference
import org.jetbrains.kotlin.fir.references.builder.buildResolvedNamedReference
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.*
import org.jetbrains.kotlin.fir.resolve.providers.dependenciesSymbolProvider
import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider
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.impl.toConeType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ private fun generateTransformBodyForFunction(
val suspendLambda = context.createSuspendLambdaWithCoroutineScope(
parent = originFunction.parent,
// suspend () -> ?
lambdaType = context.symbols.suspendFunctionN(0).typeWith(originFunction.returnType),
lambdaType = context.irBuiltIns.suspendFunctionN(0).typeWith(originFunction.returnType),
originFunction = originFunction
).also { +it }

Expand Down Expand Up @@ -459,7 +459,7 @@ private fun generateTransformBodyForFunctionLambda(
function = function
)

val lambdaType = context.symbols.suspendFunctionN(0).typeWith(suspendLambdaFunc.returnType)
val lambdaType = context.irBuiltIns.suspendFunctionN(0).typeWith(suspendLambdaFunc.returnType)

IrFunctionExpressionImpl(
UNDEFINED_OFFSET,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package love.forte.plugin.suspendtrans
import love.forte.plugin.suspendtrans.runners.AbstractCodeGenTestRunner
import org.jetbrains.kotlin.generators.generateTestGroupSuiteWithJUnit5
import org.jetbrains.kotlin.generators.dsl.junit5.generateTestGroupSuiteWithJUnit5

private const val PROJECT_ROOT = "compiler/suspend-transform-plugin"

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.21"
kotlin = "2.3.0"

# https://www.jetbrains.com/help/kotlin-multiplatform-dev/multiplatform-publish-libraries.html#configure-the-project
# https://github.com/vanniktech/gradle-maven-publish-plugin
Expand Down
33 changes: 16 additions & 17 deletions kotlin-js-store/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ engine.io@~6.5.2:
engine.io-parser "~5.2.1"
ws "~8.11.0"

enhanced-resolve@^5.17.2:
enhanced-resolve@^5.17.3:
version "5.18.3"
resolved "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz#9b5f4c5c076b8787c78fe540392ce76a88855b44"
integrity sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==
Expand Down Expand Up @@ -1198,10 +1198,9 @@ [email protected]:
minimatch "^9.0.3"
webpack-merge "^4.1.5"

[email protected].4:
"karma@github:Kotlin/karma#6.4.5":
version "6.4.4"
resolved "https://mirrors.cloud.tencent.com/npm/karma/-/karma-6.4.4.tgz#dfa5a426cf5a8b53b43cd54ef0d0d09742351492"
integrity sha512-LrtUxbdvt1gOpo3gxG+VAJlJAEMhbWlM4YrFQgql98FwF7+K8K12LYO4hnDdUkNjeztYrOXEMqgTajSWgmtI/w==
resolved "https://codeload.github.com/Kotlin/karma/tar.gz/239a8fc984584f0d96b1dd750e7a5e2c79da93a6"
dependencies:
"@colors/colors" "1.5.0"
body-parser "^1.19.0"
Expand Down Expand Up @@ -1233,10 +1232,10 @@ 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.1.0:
version "2.1.0"
resolved "https://registry.npmmirror.com/kotlin-web-helpers/-/kotlin-web-helpers-2.1.0.tgz#6cd4b0f0dc3baea163929c8638155b8d19c55a74"
integrity sha512-NAJhiNB84tnvJ5EQx7iER3GWw7rsTZkX9HVHZpe7E3dDBD/dhTzqgSwNU3MfQjniy2rB04bP24WM9Z32ntUWRg==
kotlin-web-helpers@3.0.0:
version "3.0.0"
resolved "https://registry.npmmirror.com/kotlin-web-helpers/-/kotlin-web-helpers-3.0.0.tgz#3ed6b48f694f74bb60a737a9d7e2c0e3b29abdb9"
integrity sha512-kdQO4AJQkUPvpLh9aglkXDRyN+CfXO7pKq+GESEnxooBFkQpytLrqZis3ABvmFN1cGw/ZQ/K38u5sRGW+NfBnw==
dependencies:
format-util "^1.0.5"

Expand Down Expand Up @@ -1353,10 +1352,10 @@ mkdirp@^0.5.5:
dependencies:
minimist "^1.2.6"

[email protected].1:
version "11.7.1"
resolved "https://registry.npmmirror.com/mocha/-/mocha-11.7.1.tgz#91948fecd624fb4bd154ed260b7e1ad3910d7c7a"
integrity sha512-5EK+Cty6KheMS/YLPPMJC64g5V61gIR25KsRItHw6x4hEKT6Njp1n9LOlH4gpevuwMVS66SXaBBpg+RWZkza4A==
[email protected].2:
version "11.7.2"
resolved "https://registry.npmmirror.com/mocha/-/mocha-11.7.2.tgz#3c0079fe5cc2f8ea86d99124debcc42bb1ab22b5"
integrity sha512-lkqVJPmqqG/w5jmmFtiRvtA2jkDyNVUcefFJKb2uyX4dekk8Okgqop3cgbFiaIvj8uCRJVTP5x9dfxGyXm2jvQ==
dependencies:
browser-stdout "^1.3.1"
chokidar "^4.0.1"
Expand Down Expand Up @@ -1998,10 +1997,10 @@ webpack-sources@^3.3.3:
resolved "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.3.3.tgz#d4bf7f9909675d7a070ff14d0ef2a4f3c982c723"
integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==

webpack@5.100.2:
version "5.100.2"
resolved "https://registry.npmmirror.com/webpack/-/webpack-5.100.2.tgz#e2341facf9f7de1d702147c91bcb65b693adf9e8"
integrity sha512-QaNKAvGCDRh3wW1dsDjeMdDXwZm2vqq3zn6Pvq4rHOEOGSaUMgOOjG2Y9ZbIGzpfkJk9ZYTHpDqgDfeBDcnLaw==
webpack@5.101.3:
version "5.101.3"
resolved "https://registry.npmmirror.com/webpack/-/webpack-5.101.3.tgz#3633b2375bb29ea4b06ffb1902734d977bc44346"
integrity sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==
dependencies:
"@types/eslint-scope" "^3.7.7"
"@types/estree" "^1.0.8"
Expand All @@ -2013,7 +2012,7 @@ [email protected]:
acorn-import-phases "^1.0.3"
browserslist "^4.24.0"
chrome-trace-event "^1.0.2"
enhanced-resolve "^5.17.2"
enhanced-resolve "^5.17.3"
es-module-lexer "^1.2.1"
eslint-scope "5.1.1"
events "^3.2.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
plugins {
id("love.forte.plugin.suspend-transform") version "2.2.20-0.13.1" apply false
id("love.forte.plugin.suspend-transform") version "2.3.0-0.13.2" apply false
}
Loading