Kotlin: address PR review feedback

Align Kotlin 2.4 registrar plugin id with command-line processor, drop unused registrar state, fix the function-reference explanatory comment, and remove 1.x extractor targets from VERSIONS.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Anders Fugmann
2026-06-11 13:34:59 +02:00
parent a5d9f6e914
commit e50e0b58f2
4 changed files with 2 additions and 17 deletions

View File

@@ -237,9 +237,6 @@ use_repo(
kotlin_extractor_deps,
"codeql_kotlin_defaults",
"codeql_kotlin_embeddable",
"kotlin-compiler-1.8.0",
"kotlin-compiler-1.9.0-Beta",
"kotlin-compiler-1.9.20-Beta",
"kotlin-compiler-2.0.0-RC1",
"kotlin-compiler-2.0.20-Beta2",
"kotlin-compiler-2.1.0-Beta1",
@@ -249,9 +246,6 @@ use_repo(
"kotlin-compiler-2.3.0",
"kotlin-compiler-2.3.20",
"kotlin-compiler-2.4.0",
"kotlin-compiler-embeddable-1.8.0",
"kotlin-compiler-embeddable-1.9.0-Beta",
"kotlin-compiler-embeddable-1.9.20-Beta",
"kotlin-compiler-embeddable-2.0.0-RC1",
"kotlin-compiler-embeddable-2.0.20-Beta2",
"kotlin-compiler-embeddable-2.1.0-Beta1",
@@ -261,9 +255,6 @@ use_repo(
"kotlin-compiler-embeddable-2.3.0",
"kotlin-compiler-embeddable-2.3.20",
"kotlin-compiler-embeddable-2.4.0",
"kotlin-stdlib-1.8.0",
"kotlin-stdlib-1.9.0-Beta",
"kotlin-stdlib-1.9.20-Beta",
"kotlin-stdlib-2.0.0-RC1",
"kotlin-stdlib-2.0.20-Beta2",
"kotlin-stdlib-2.1.0-Beta1",

View File

@@ -7808,7 +7808,7 @@ open class KotlinFileExtractor(
* constructor(dispatchReceiver: TD, extensionReceiver: TE) {
* super()
* this.dispatchReceiver = dispatchReceiver
* this.codeQlExtensionReceiver = extensionReceiver
* this.extensionReceiver = extensionReceiver
* }
* fun invoke(a0:T0, a1:T1, ... aI: TI): R { return this.dispatchReceiver.FN(a0,a1,...,aI) } OR
* fun invoke( a1:T1, ... aI: TI): R { return this.dispatchReceiver.FN(this.dispatchReceiver,a1,...,aI) } OR

View File

@@ -15,7 +15,7 @@ abstract class Kotlin2ComponentRegistrar : CompilerPluginRegistrar(), ComponentR
get() = true
override val pluginId: String
get() = "com.github.codeql.kotlin-extractor"
get() = "kotlin-extractor"
// ComponentRegistrar implementation (legacy path, still called by Kotlin compiler)
override fun registerProjectComponents(
@@ -28,7 +28,6 @@ abstract class Kotlin2ComponentRegistrar : CompilerPluginRegistrar(), ComponentR
}
private var extensionStorage: CompilerPluginRegistrar.ExtensionStorage? = null
private var registeredExtension: IrGenerationExtension? = null
override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) {
this@Kotlin2ComponentRegistrar.extensionStorage = this

View File

@@ -1,8 +1,5 @@
# when updating this list, `bazel mod tidy` should be run from `codeql` to update `MODULE.bazel`
VERSIONS = [
"1.8.0",
"1.9.0-Beta",
"1.9.20-Beta",
"2.0.0-RC1",
"2.0.20-Beta2",
"2.1.0-Beta1",
@@ -24,8 +21,6 @@ def version_less(lhs, rhs):
def get_language_version(version):
major, minor, _ = _version_to_tuple(version)
if major == 1:
return "2.0"
return "%s.%s" % (major, minor)
def _basename(path):