-
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
Open
andersfugmann
wants to merge
11
commits into
main
Choose a base branch
from
andersfugmann/kotlin-2.4.20rc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Kotlin: support 2.4.20-RC3 #22404
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
1c20efa
Kotlin: add 2.4.20-RC artifacts
andersfugmann e56fa8a
Kotlin: address KT-85816
andersfugmann 1934d4b
Kotlin: address KT-86046
andersfugmann 62a7644
Kotlin: preserve generated forwarder locations
andersfugmann a620364
Kotlin: enable 2.4.20-RC support
andersfugmann 17c352f
Kotlin: make 2.4.20-RC the test default
andersfugmann 39cf927
Kotlin: document preliminary 2.4.20-RC support
andersfugmann c037af0
Kotlin: support 2.4.20-RC2
andersfugmann 46997f2
Kotlin: document preliminary 2.4.20 support
andersfugmann 3496e40
Kotlin: restore future-version diagnostic test
andersfugmann 00bb879
Kotlin: support 2.4.20-RC3
andersfugmann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
java/kotlin-extractor/deps/kotlin-compiler-embeddable-2.4.20-RC3.jar
Git LFS file not shown
Git LFS file not shown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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(): | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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? |
||
| } | ||
| return if (jvmRepeatable != null) { | ||
| ((jvmRepeatable.codeQlGetValueArgument(0) as? IrClassReference)?.symbol as? IrClassSymbol) | ||
|
|
||
32 changes: 32 additions & 0 deletions
32
...kotlin-extractor/src/main/kotlin/utils/versions/v_2_4_20-RC3/Kotlin2ComponentRegistrar.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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): | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
...ration-tests/kotlin/all-platforms/diagnostics/kotlin-version-too-new/diagnostics.expected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.