Skip to content

Commit e50e0b5

Browse files
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>
1 parent a5d9f6e commit e50e0b5

4 files changed

Lines changed: 2 additions & 17 deletions

File tree

MODULE.bazel

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,6 @@ use_repo(
237237
kotlin_extractor_deps,
238238
"codeql_kotlin_defaults",
239239
"codeql_kotlin_embeddable",
240-
"kotlin-compiler-1.8.0",
241-
"kotlin-compiler-1.9.0-Beta",
242-
"kotlin-compiler-1.9.20-Beta",
243240
"kotlin-compiler-2.0.0-RC1",
244241
"kotlin-compiler-2.0.20-Beta2",
245242
"kotlin-compiler-2.1.0-Beta1",
@@ -249,9 +246,6 @@ use_repo(
249246
"kotlin-compiler-2.3.0",
250247
"kotlin-compiler-2.3.20",
251248
"kotlin-compiler-2.4.0",
252-
"kotlin-compiler-embeddable-1.8.0",
253-
"kotlin-compiler-embeddable-1.9.0-Beta",
254-
"kotlin-compiler-embeddable-1.9.20-Beta",
255249
"kotlin-compiler-embeddable-2.0.0-RC1",
256250
"kotlin-compiler-embeddable-2.0.20-Beta2",
257251
"kotlin-compiler-embeddable-2.1.0-Beta1",
@@ -261,9 +255,6 @@ use_repo(
261255
"kotlin-compiler-embeddable-2.3.0",
262256
"kotlin-compiler-embeddable-2.3.20",
263257
"kotlin-compiler-embeddable-2.4.0",
264-
"kotlin-stdlib-1.8.0",
265-
"kotlin-stdlib-1.9.0-Beta",
266-
"kotlin-stdlib-1.9.20-Beta",
267258
"kotlin-stdlib-2.0.0-RC1",
268259
"kotlin-stdlib-2.0.20-Beta2",
269260
"kotlin-stdlib-2.1.0-Beta1",

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7808,7 +7808,7 @@ open class KotlinFileExtractor(
78087808
* constructor(dispatchReceiver: TD, extensionReceiver: TE) {
78097809
* super()
78107810
* this.dispatchReceiver = dispatchReceiver
7811-
* this.codeQlExtensionReceiver = extensionReceiver
7811+
* this.extensionReceiver = extensionReceiver
78127812
* }
78137813
* fun invoke(a0:T0, a1:T1, ... aI: TI): R { return this.dispatchReceiver.FN(a0,a1,...,aI) } OR
78147814
* fun invoke( a1:T1, ... aI: TI): R { return this.dispatchReceiver.FN(this.dispatchReceiver,a1,...,aI) } OR

java/kotlin-extractor/src/main/kotlin/utils/versions/v_2_4_0/Kotlin2ComponentRegistrar.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ abstract class Kotlin2ComponentRegistrar : CompilerPluginRegistrar(), ComponentR
1515
get() = true
1616

1717
override val pluginId: String
18-
get() = "com.github.codeql.kotlin-extractor"
18+
get() = "kotlin-extractor"
1919

2020
// ComponentRegistrar implementation (legacy path, still called by Kotlin compiler)
2121
override fun registerProjectComponents(
@@ -28,7 +28,6 @@ abstract class Kotlin2ComponentRegistrar : CompilerPluginRegistrar(), ComponentR
2828
}
2929

3030
private var extensionStorage: CompilerPluginRegistrar.ExtensionStorage? = null
31-
private var registeredExtension: IrGenerationExtension? = null
3231

3332
override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) {
3433
this@Kotlin2ComponentRegistrar.extensionStorage = this

java/kotlin-extractor/versions.bzl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# when updating this list, `bazel mod tidy` should be run from `codeql` to update `MODULE.bazel`
22
VERSIONS = [
3-
"1.8.0",
4-
"1.9.0-Beta",
5-
"1.9.20-Beta",
63
"2.0.0-RC1",
74
"2.0.20-Beta2",
85
"2.1.0-Beta1",
@@ -24,8 +21,6 @@ def version_less(lhs, rhs):
2421

2522
def get_language_version(version):
2623
major, minor, _ = _version_to_tuple(version)
27-
if major == 1:
28-
return "2.0"
2924
return "%s.%s" % (major, minor)
3025

3126
def _basename(path):

0 commit comments

Comments
 (0)