-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Kotlin: support 2.4.20-RC3 #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-RC3 #22404
Changes from all commits
b6f5682
2921709
115b2a2
4ea853a
6e54904
77bc0b6
da6394d
d05ce39
0534c6c
5e9dec1
e7e97c4
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-RC3" | ||
|
|
||
|
|
||
| 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-RC3", | ||
| ] | ||
|
|
||
| def _version_to_tuple(v): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| category: minorAnalysis | ||
| --- | ||
| * Preliminary support for Kotlin 2.4.20 has been added. |
Uh oh!
There was an error while loading. Please reload this page.