Skip to content

Commit 557f904

Browse files
Kotlin: Drop support for Kotlin 1.x language versions
Kotlin 2.4.0 no longer supports -language-version 1.9 (the last 1.x version). Clamp get_language_version() in versions.bzl to minimum 2.0 for extractor builds, and update the supported versions documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 5732a99 commit 557f904

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

docs/codeql/reusables/supported-versions-compilers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Java,"Java 7 to 26 [6]_","javac (OpenJDK and Oracle JDK),
2222

2323
Eclipse compiler for Java (ECJ) [7]_",``.java``
24-
Kotlin,"Kotlin 1.8.0 to 2.4.\ *x*","kotlinc",``.kt``
24+
Kotlin,"Kotlin 2.0.0 to 2.4.\ *x*","kotlinc",``.kt``
2525
JavaScript,ECMAScript 2022 or lower,Not applicable,"``.js``, ``.jsx``, ``.mjs``, ``.es``, ``.es6``, ``.htm``, ``.html``, ``.xhtm``, ``.xhtml``, ``.vue``, ``.hbs``, ``.ejs``, ``.njk``, ``.json``, ``.yaml``, ``.yml``, ``.raml``, ``.xml`` [8]_"
2626
Python [9]_,"2.7, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13",Not applicable,``.py``
2727
Ruby [10]_,"up to 3.3",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``"

java/kotlin-extractor/versions.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def version_less(lhs, rhs):
2424

2525
def get_language_version(version):
2626
major, minor, _ = _version_to_tuple(version)
27+
if major == 1:
28+
return "2.0"
2729
return "%s.%s" % (major, minor)
2830

2931
def _basename(path):
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: deprecation
3+
---
4+
* Kotlin versions below 2.0.0 are no longer supported for analysis. The minimum supported version is now Kotlin 2.0.0.

0 commit comments

Comments
 (0)