Skip to content

Commit e4aa8f5

Browse files
committed
switching to dev.zacsweers.kctfork for kotlin compile testing
1 parent 70b751b commit e4aa8f5

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ version=1.0.0
33
jupyterApiTCRepo=
44
kotlin.jupyter.add.scanner=false
55
org.gradle.jvmargs=-Xmx4G
6+
7+
# We don't support ksp2
68
ksp.useKSP2=false
79

810
# build.number.detection=false

gradle/libs.versions.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ libsPublisher = "1.9.23-dev-45"
1313
# "Bootstrap" version of the dataframe, used in the build itself to generate @DataSchema APIs,
1414
# dogfood Gradle / KSP plugins in tests and idea-examples modules
1515
dataframe = "1.0.0-dev-6538"
16+
#dataframe = "1.0.0-dev"
1617
korro = "0.1.6"
1718

1819
binaryCompatibilityValidator = "0.17.0"
@@ -51,7 +52,7 @@ plugin-publish = "1.3.0"
5152
shadow = "8.3.5"
5253
android-gradle-api = "7.3.1" # need to revise our tests to update
5354
ktor = "3.0.1" # needs jupyter compatibility with Kotlin 2.1 to update
54-
kotlin-compile-testing = "1.6.0"
55+
kotlin-compile-testing = "0.7.1"
5556
duckdb = "1.1.3"
5657
buildconfig = "5.5.1"
5758
benchmark = "0.4.12"
@@ -138,8 +139,8 @@ android-gradle = { group = "com.android.tools.build", name = "gradle", version.r
138139
kotlin-gradle-plugin = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin" }
139140
kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api" }
140141
ktor-server-netty = { group = "io.ktor", name = "ktor-server-netty", version.ref = "ktor" }
141-
kotlin-compile-testing = { group = "com.github.tschuchortdev", name = "kotlin-compile-testing", version.ref = "kotlin-compile-testing" }
142-
kotlin-compile-testing-ksp = { group = "com.github.tschuchortdev", name = "kotlin-compile-testing-ksp", version.ref = "kotlin-compile-testing" }
142+
kotlin-compile-testing = { group = "dev.zacsweers.kctfork", name = "core", version.ref = "kotlin-compile-testing" }
143+
kotlin-compile-testing-ksp = { group = "dev.zacsweers.kctfork", name = "ksp", version.ref = "kotlin-compile-testing" }
143144
kotlin-compiler = { group = "org.jetbrains.kotlin", name = "kotlin-compiler", version.ref = "kotlin" }
144145
kotlin-compiler-embeddable = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-embeddable", version.ref = "kotlin" }
145146
kotlin-compiler-internal-test-framework = { group = "org.jetbrains.kotlin", name = "kotlin-compiler-internal-test-framework", version.ref = "kotlin" }

plugins/dataframe-gradle-plugin/src/main/kotlin/org/jetbrains/dataframe/gradle/SchemaGeneratorPlugin.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SchemaGeneratorPlugin : Plugin<Project> {
3939
val generationTasks = extension.schemas.map {
4040
createTask(target, extension, appliedPlugin, it)
4141
}
42-
val generateAll = target.tasks.create("generateDataFrames") {
42+
val generateAll = target.tasks.register("generateDataFrames") {
4343
group = GROUP
4444
dependsOn(*generationTasks.toTypedArray())
4545
}
@@ -124,7 +124,7 @@ class SchemaGeneratorPlugin : Plugin<Project> {
124124
val defaultPath = schema.defaultPath ?: extension.defaultPath ?: true
125125
val delimiters = schema.withNormalizationBy ?: extension.withNormalizationBy ?: setOf('\t', ' ', '_')
126126

127-
return target.tasks.create("generateDataFrame$interfaceName", GenerateDataSchemaTask::class.java) {
127+
return target.tasks.register("generateDataFrame$interfaceName", GenerateDataSchemaTask::class.java) {
128128
(logging as? DefaultLoggingManager)?.setLevelInternal(LogLevel.QUIET)
129129
group = GROUP
130130
data.set(schema.data)
@@ -138,7 +138,7 @@ class SchemaGeneratorPlugin : Plugin<Project> {
138138
this.defaultPath.set(defaultPath)
139139
this.delimiters.set(delimiters)
140140
this.enableExperimentalOpenApi.set(extension.enableExperimentalOpenApi)
141-
}
141+
}.get()
142142
}
143143

144144
private fun getInterfaceName(schema: Schema): String? {

plugins/symbol-processor/src/test/kotlin/org/jetbrains/dataframe/ksp/runner/KspCompilationTestRunner.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
package org.jetbrains.dataframe.ksp.runner
44

5+
import com.tschuchort.compiletesting.JvmCompilationResult
56
import com.tschuchort.compiletesting.KotlinCompilation
67
import com.tschuchort.compiletesting.SourceFile
7-
import com.tschuchort.compiletesting.kspArgs
8+
import com.tschuchort.compiletesting.kspProcessorOptions
89
import com.tschuchort.compiletesting.kspSourcesDir
910
import com.tschuchort.compiletesting.symbolProcessorProviders
1011
import org.jetbrains.dataframe.ksp.DataFrameSymbolProcessorProvider
@@ -15,7 +16,7 @@ import java.nio.file.Paths
1516

1617
@Suppress("unused")
1718
internal class KotlinCompileTestingCompilationResult(
18-
val delegate: KotlinCompilation.Result,
19+
val delegate: JvmCompilationResult,
1920
val successfulCompilation: Boolean,
2021
val kspGeneratedFiles: List<File>,
2122
val outputSourceDirs: List<File>,
@@ -43,8 +44,8 @@ internal object KspCompilationTestRunner {
4344
classpaths = params.classpath,
4445
tempDir = compilationDir,
4546
)
46-
kspCompilation.kspArgs.putAll(params.options)
47-
kspCompilation.symbolProcessorProviders = listOf(DataFrameSymbolProcessorProvider())
47+
kspCompilation.kspProcessorOptions.putAll(params.options)
48+
kspCompilation.symbolProcessorProviders = mutableListOf(DataFrameSymbolProcessorProvider())
4849
kspCompilation.compile().also {
4950
println(it.messages)
5051
if (it.exitCode == KotlinCompilation.ExitCode.COMPILATION_ERROR) {

0 commit comments

Comments
 (0)