From 557f904e22bdd33764db6071313b75d9a801378b Mon Sep 17 00:00:00 2001 From: Anders Fugmann Date: Mon, 8 Jun 2026 15:02:03 +0200 Subject: [PATCH] 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> --- docs/codeql/reusables/supported-versions-compilers.rst | 2 +- java/kotlin-extractor/versions.bzl | 2 ++ java/ql/lib/change-notes/2026-06-08-kotlin-drop-1x.md | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 java/ql/lib/change-notes/2026-06-08-kotlin-drop-1x.md diff --git a/docs/codeql/reusables/supported-versions-compilers.rst b/docs/codeql/reusables/supported-versions-compilers.rst index aacb188eb20..050de918049 100644 --- a/docs/codeql/reusables/supported-versions-compilers.rst +++ b/docs/codeql/reusables/supported-versions-compilers.rst @@ -21,7 +21,7 @@ Java,"Java 7 to 26 [6]_","javac (OpenJDK and Oracle JDK), Eclipse compiler for Java (ECJ) [7]_",``.java`` - Kotlin,"Kotlin 1.8.0 to 2.4.\ *x*","kotlinc",``.kt`` + Kotlin,"Kotlin 2.0.0 to 2.4.\ *x*","kotlinc",``.kt`` 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]_" 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`` Ruby [10]_,"up to 3.3",Not applicable,"``.rb``, ``.erb``, ``.gemspec``, ``Gemfile``" diff --git a/java/kotlin-extractor/versions.bzl b/java/kotlin-extractor/versions.bzl index f9642c96b78..de2d9e535a6 100644 --- a/java/kotlin-extractor/versions.bzl +++ b/java/kotlin-extractor/versions.bzl @@ -24,6 +24,8 @@ def version_less(lhs, rhs): def get_language_version(version): major, minor, _ = _version_to_tuple(version) + if major == 1: + return "2.0" return "%s.%s" % (major, minor) def _basename(path): diff --git a/java/ql/lib/change-notes/2026-06-08-kotlin-drop-1x.md b/java/ql/lib/change-notes/2026-06-08-kotlin-drop-1x.md new file mode 100644 index 00000000000..19a75b1df32 --- /dev/null +++ b/java/ql/lib/change-notes/2026-06-08-kotlin-drop-1x.md @@ -0,0 +1,4 @@ +--- +category: deprecation +--- +* Kotlin versions below 2.0.0 are no longer supported for analysis. The minimum supported version is now Kotlin 2.0.0.