Skip to content

Commit b1fefb3

Browse files
committed
Revert "UPDATE_KOTLIN_VERSION: 2.0.0-dev-4562"
This reverts commit 6fb3ea5.
1 parent 9dc9cdb commit b1fefb3

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

compiler-plugin/src/main/kotlin/com/google/devtools/ksp/symbol/impl/binary/KSDeclarationDescriptorImpl.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ package com.google.devtools.ksp.symbol.impl.binary
2020
import com.google.devtools.ksp.common.impl.KSNameImpl
2121
import com.google.devtools.ksp.common.memoized
2222
import com.google.devtools.ksp.symbol.*
23+
import org.jetbrains.kotlin.backend.common.serialization.findPackage
2324
import org.jetbrains.kotlin.descriptors.ClassDescriptor
2425
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
2526
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
26-
import org.jetbrains.kotlin.descriptors.findPackage
2727
import org.jetbrains.kotlin.load.java.descriptors.JavaClassDescriptor
2828
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
2929
import org.jetbrains.kotlin.resolve.descriptorUtil.parents
@@ -50,7 +50,7 @@ abstract class KSDeclarationDescriptorImpl(private val descriptor: DeclarationDe
5050
is ClassDescriptor -> KSClassDeclarationDescriptorImpl.getCached(containingDescriptor)
5151
is FunctionDescriptor -> KSFunctionDeclarationDescriptorImpl.getCached(containingDescriptor)
5252
else -> null
53-
}
53+
} as KSDeclaration?
5454
}
5555

5656
override val parent: KSNode? by lazy {

integration-tests/src/test/kotlin/com/google/devtools/ksp/test/KSPCmdLineOptionsIT.kt

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ class KSPCmdLineOptionsIT(val useKSP2: Boolean) {
3838
}.maxByOrNull { it.lastModified() }!!
3939
val compilerArgs = mutableListOf(
4040
"-no-stdlib",
41-
"-language-version", "1.9",
4241
"-Xplugin=${kspPluginJar.absolutePath}",
4342
"-Xplugin=${kspApiJar.absolutePath}",
4443
"-P", "plugin:$kspPluginId:apclasspath=${processorJar.absolutePath}",

integration-tests/src/test/kotlin/com/google/devtools/ksp/test/PlaygroundIT.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ class PlaygroundIT(val useKSP2: Boolean) {
223223
Assert.assertTrue(jarFile.getEntry("hello/HELLO.class").size > 0)
224224
Assert.assertTrue(jarFile.getEntry("com/example/AClassBuilder.class").size > 0)
225225
}
226+
Assert.assertTrue(result.output.contains("w: Language version 2.0 is experimental"))
226227
project.restore(buildFile.path)
227228
}
228229

@@ -262,6 +263,7 @@ class PlaygroundIT(val useKSP2: Boolean) {
262263
Assert.assertTrue(jarFile.getEntry("hello/HELLO.class").size > 0)
263264
Assert.assertTrue(jarFile.getEntry("com/example/AClassBuilder.class").size > 0)
264265
}
266+
Assert.assertTrue(result.output.contains("w: Language version 2.0 is experimental"))
265267
project.restore(buildFile.path)
266268
project.restore(gradleProperties.path)
267269
}
@@ -302,12 +304,12 @@ class PlaygroundIT(val useKSP2: Boolean) {
302304
gradleRunner.withArguments("build").buildAndFail().let {
303305
Assert.assertEquals(TaskOutcome.SUCCESS, it.task(":workload:kspKotlin")?.outcome)
304306
Assert.assertEquals(TaskOutcome.FAILED, it.task(":workload:compileKotlin")?.outcome)
305-
Assert.assertTrue("Unresolved reference 'AClassBuilder'" in it.output)
307+
Assert.assertTrue("Unresolved reference: AClassBuilder" in it.output)
306308
}
307309
gradleRunner.withArguments("build").buildAndFail().let {
308310
Assert.assertEquals(TaskOutcome.UP_TO_DATE, it.task(":workload:kspKotlin")?.outcome)
309311
Assert.assertEquals(TaskOutcome.FAILED, it.task(":workload:compileKotlin")?.outcome)
310-
Assert.assertTrue("Unresolved reference 'AClassBuilder'" in it.output)
312+
Assert.assertTrue("Unresolved reference: AClassBuilder" in it.output)
311313
}
312314

313315
project.restore("workload/build.gradle.kts")

0 commit comments

Comments
 (0)