-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Kotlin: support 2.4.20 #22404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Kotlin: support 2.4.20 #22404
Changes from all commits
796790d
ea75176
b891c6a
78caf2f
0e0b862
a5a1878
352483f
b1c4fe7
8301109
570eba1
8b72dd3
47cc7d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,7 +27,7 @@ | |
| import io | ||
| import os | ||
|
|
||
| DEFAULT_VERSION = "2.4.10" | ||
| DEFAULT_VERSION = "2.4.20" | ||
|
|
||
|
|
||
| def options(): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,8 +96,7 @@ class MetaAnnotationSupport( | |
| val metaAnnotations = annotationClass.annotations | ||
| val jvmRepeatable = | ||
| metaAnnotations.find { | ||
| it.symbol.owner.parentAsClass.fqNameWhenAvailable == | ||
| JvmAnnotationNames.REPEATABLE_ANNOTATION | ||
| it.annotationClass.fqNameWhenAvailable == JvmAnnotationNames.REPEATABLE_ANNOTATION | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this work with earlier Kotlin versions?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Copilot has scanned all the supported versions (>= 1.8.0) to verify that its supported:
|
||
| } | ||
| return if (jvmRepeatable != null) { | ||
| ((jvmRepeatable.codeQlGetValueArgument(0) as? IrClassReference)?.symbol as? IrClassSymbol) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| package com.github.codeql | ||
|
andersfugmann marked this conversation as resolved.
|
||
|
|
||
| import org.jetbrains.kotlin.backend.common.extensions.IrGenerationExtension | ||
| import org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar | ||
| import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi | ||
| import org.jetbrains.kotlin.config.CompilerConfiguration | ||
|
|
||
| @OptIn(ExperimentalCompilerApi::class) | ||
| abstract class Kotlin2ComponentRegistrar : CompilerPluginRegistrar() { | ||
| override val supportsK2: Boolean | ||
| get() = true | ||
|
|
||
| override val pluginId: String | ||
| get() = "kotlin-extractor" | ||
|
|
||
| private var extensionStorage: CompilerPluginRegistrar.ExtensionStorage? = null | ||
|
|
||
| override fun ExtensionStorage.registerExtensions(configuration: CompilerConfiguration) { | ||
| this@Kotlin2ComponentRegistrar.extensionStorage = this | ||
| doRegisterExtensions(configuration) | ||
| } | ||
|
|
||
| abstract fun doRegisterExtensions(configuration: CompilerConfiguration) | ||
|
|
||
| protected fun registerExtractorExtension(extension: IrGenerationExtension) { | ||
| val storage = extensionStorage | ||
| ?: throw IllegalStateException("registerExtractorExtension called before registerExtensions") | ||
| with(storage) { | ||
| IrGenerationExtension.registerExtension(extension) | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,7 @@ VERSIONS = [ | |
| "2.3.0", | ||
| "2.3.20", | ||
| "2.4.0", | ||
| "2.4.20", | ||
| ] | ||
|
|
||
| def _version_to_tuple(v): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| category: minorAnalysis | ||
| --- | ||
| * Support for Kotlin 2.4.20 has been added. |
Uh oh!
There was an error while loading. Please reload this page.