-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Kotlin: Add 1.8 support #11637
Kotlin: Add 1.8 support #11637
Conversation
Kotlin 1.8 was just released :) |
Any progress on this? :) |
until github/codeql#11637 has been deployed
disable until github/codeql#11637 has been deployed
bb4117b
to
7054bc9
Compare
The build no longer works for Kotlin < 1.8: We get error: class 'org.jetbrains.kotlin.ir.IrElement' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
We now get better locations, with Kotlin 1.8.0.
We get better locations with Kotlin 1.8.0.
5cb18bd
to
3367da8
Compare
# 21| 1: [Method] a | ||
#-----| 1: (Annotations) | ||
# 21| 1: [Annotation] JvmName | ||
# 0| 1: [StringLiteral] "a" | ||
# 21| 1: [StringLiteral] "a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the reason for these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kotlin is now giving the components of annotations locations, so we are getting a line number (21) for this.
# 0| -1: [TypeAccess] Y | ||
# 0| 5: [ArrayInit] {...} | ||
# 0| 1: [VarAccess] Y.C | ||
# 0| -1: [TypeAccess] Y | ||
# 0| 2: [VarAccess] Y.A | ||
# 0| -1: [TypeAccess] Y | ||
# 0| 6: [Annotation] Annot0k | ||
# 0| 4: [Annotation] Annot0k | ||
# 0| 1: [IntegerLiteral] 1 | ||
# 39| 5: [VarAccess] Y.B | ||
# 39| -1: [TypeAccess] Y | ||
# 39| 6: [ArrayInit] {...} | ||
# 39| 1: [VarAccess] Y.C | ||
# 39| -1: [TypeAccess] Y | ||
# 39| 2: [VarAccess] Y.A | ||
# 39| -1: [TypeAccess] Y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the order changed here. Why? Is it expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just because PrintAst uses locations to order by
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Yes, you're right. AnnotationsNode
is ordering child elements by file, line, column, element.toString()
.
@tamasvajk @igfoo When can this be used in GitHub Actions? |
We expect it will be in the default actions image by 15th February. |
@tamasvajk @igfoo I was wondering if there was any reason that prevents CodeQL from supporting newer/upcoming Kotlin patch versions? We've recently upgraded to Kotlin 1.8.10 in one of our builds, but unfortunately it looks like CodeQL supports only the versions below 1.8.10 cc @blindpirate |
Unfortunately, versions that change the 10s digit of the patch version tend to have minor changes to the compiler's implementation, which require corresponding changes to our plugin. |
Codeql doesn't support 1.8.10 yet: github/codeql#11637 (comment) but it does support 1.8.0 now
We need to revert to `kotlin-1.8.0` because `CodeQL` don't currently support a version `>= 1.8.10` ```txt Kotlin version 1.8.10 is too recent. CodeQL currently supports versions below 1.8.10 ``` For more information see: <github/codeql#11637 (comment)> closes #4216
We need to revert to `kotlin-1.8.0` because `CodeQL` don't currently support a version `>= 1.8.10` ```txt Kotlin version 1.8.10 is too recent. CodeQL currently supports versions below 1.8.10 ``` For more information see: <github/codeql#11637 (comment)> closes #4217
We need to revert to `kotlin-1.8.0` because `CodeQL` don't currently support a version `>= 1.8.10` ```txt Kotlin version 1.8.10 is too recent. CodeQL currently supports versions below 1.8.10 ``` For more information see: <github/codeql#11637 (comment)> closes #4216
No description provided.