1439 Commits

Author SHA1 Message Date
Anders Fugmann
d5827b5cca Kotlin: Support Kotlin 2.3.10 2026-02-06 14:54:08 +01:00
Anders Fugmann
ab495fa843 Kotlin: Inline cast 2026-01-28 10:11:22 +01:00
Anders Fugmann
2320d502db Kotlin: Address detections from kotin internal queries 2026-01-28 10:11:21 +01:00
Anders Fugmann
31867a56fb Kotlin: Accept test changes
Accept test changes from Kotlin 2.3.0 update

Updates expected test outputs for kotlin2 library tests to match
actual compiler output. Changes include:
- Location adjustments for properties/methods (now point to identifiers)
- CastExpr -> ImplicitCastExpr for implicit type casts
- Removed duplicate BlockStmt entries in loop ASTs
- Super constructor call location changes

Note that in Kotlin 2.3.0 super constructor calls now have locations spanning
entire class declarations instead of the actual super call site.
2026-01-28 10:11:21 +01:00
Anders Fugmann
e1f3d5b374 Kotlin: Do not skip writing of getter and setters if the local deligate is null 2026-01-28 09:30:20 +01:00
Anders Fugmann
5cdfb77504 Kotlin: Add additional warning suppresion to v1_9_0 and remove copy in v2_3_0 2026-01-28 09:30:20 +01:00
Anders Fugmann
8ee35231c2 Kotlin: Remove support for Kotlin versions 1.6 and 1.7
This change rolls up all files from v1_6_0, v1_6_20, v1_7_0 and v_1_7_20.
In addition, versioned files that are not overridden by any later Kotlin versions (i.e. files that only have one copy under utils/versions) are inlined and removed to simplify list of changes.

List of removed/inlined files:
     allOverriddenIncludingSelf.kt
     copyTo.kt
     ExperimentalCompilerApi.kt
     getFileClassFqName.kt
     IsUnderscoreParameter.kt
     ReferenceEntity.kt
     SyntheticBodyKind.kt
     Types.kt
     withHasQuestionMark.kt
2026-01-28 09:30:20 +01:00
Anders Fugmann
55525279ca Kotlin: Remove obsolete file 2026-01-28 09:30:19 +01:00
Anders Fugmann
4d7c84178a Kotlin: Fix spelling 2026-01-28 09:30:19 +01:00
Anders Fugmann
eb37255c4b Kotlin: Create IrSimpleType factory function to support constructor changes introduced in Kotlin 2.3 2026-01-28 09:30:18 +01:00
Anders Fugmann
164cae845d Kotlin: Strip prefix when building plugin 2026-01-28 09:30:18 +01:00
Anders Fugmann
b8d01ed21b Kotlin: Fix bazel format and address copilot review comments 2026-01-28 09:30:18 +01:00
Anders Fugmann
cc25d30fed Kotlin: Update compiler plugin for Kotlin 2.3.0 2026-01-28 09:30:17 +01:00
Anders Fugmann
07e5479aff Kotlin: Add support for Kotlin 2.3.0 2026-01-28 09:30:17 +01:00
Anders Fugmann
bc419fd35c Kotlin: Silence compilation warnings 2026-01-28 09:30:16 +01:00
Anders Fugmann
772503bad8 Kotlin: Remove resource_strip_prefix for kotlin extraction 2026-01-28 09:30:16 +01:00
Anders Fugmann
beff080ee7 Kotlin: Update kotlin_rules to 2.2.0 and remove support for Kotlin 1.6 and 1.7 2026-01-28 09:30:16 +01:00
Anders Fugmann
c488086135 Kotlin: Ensure the kotlin extractor is loaded as the last extension to be able to capture expansions from other extensions 2026-01-26 10:38:11 +01:00
Ian Lynagh
1efecc099c Kotlin: Avoid infinite recursion when extracting recursive interfaces 2025-10-31 13:42:43 +00:00
Ian Lynagh
e589019e04 Kotlin: Use 2.2.20-Beta2 rather than 2.2.20-Beta1 2025-07-30 14:14:14 +01:00
Ian Lynagh
4ea6133042 Kotlin: Add 2.2.20-Beta2 jars 2025-07-30 14:13:02 +01:00
Ian Lynagh
c78818d7dd Kotlin: Remove *2.2.20-Beta1* jars 2025-07-30 14:12:43 +01:00
Ian Lynagh
604af65b02 Kotlin: Opt in to DeprecatedForRemovalCompilerApi
We'll need a proper fix for this, but this will keep things working in
the meantime.
2025-07-23 12:51:12 +01:00
Ian Lynagh
709c111522 Kotlin: Add getJvmModuleNameForDeserializedDescriptor wrapper
It has been removed in 2.2.20.
2025-07-23 12:51:12 +01:00
Ian Lynagh
8432f6e42e Kotlin: Add 2.2.20-Beta1 version 2025-07-23 11:52:48 +01:00
Ian Lynagh
965f1fc547 Kotlin: Add 2.2.20 deps 2025-07-23 11:51:45 +01:00
Ian Lynagh
65bd1aff83 Kotlin: Update default version to 2.2.0
Changes the default version from 2.1.20 to 2.2.0 in the wrapper.py file.
2025-07-22 17:38:14 +01:00
Ian Lynagh
a6701ced8d Kotlin: Update regex patterns to use raw string notation
Fixes warnings like
SyntaxWarning: invalid escape sequence '\S'
2025-07-13 23:42:50 +01:00
Chuan-kai Lin
565627847f pick-kotlin-version.py: tolerate warnings
This commit changes pick-kotlin-version.py to use re.search() instead of
re.match(), so that it can better cope with warning messages.
2025-06-24 08:13:43 -07:00
Chris Smowton
084222ec58 Inline version-specific override code where there is now only one version 2025-05-15 12:13:14 +01:00
Chris Smowton
79171a9232 Fold v_1_5_0 and v_1_5_20 files forwards into v_1_6_0, dropping any that are overridden 2025-05-15 11:39:26 +01:00
Chris Smowton
fecad025de Fix handling of X/jvm-default intermediate modes such as 'compatibility', the new default as of 2.2.0 2025-05-13 18:10:21 +01:00
Chris Smowton
0d34837eaf Bump unit tests to use latest stable Kotlin 2025-05-13 14:42:16 +01:00
Chris Smowton
29d369f22f Don't try to decode a class from a .java file 2025-05-13 14:42:12 +01:00
Chris Smowton
0d21fa51f2 Change default version 2025-05-13 14:42:11 +01:00
Chris Smowton
a36fc30d44 Fix build for Kotlin 2.2.0 2025-05-13 14:42:06 +01:00
Chris Smowton
24feb51661 Fix Gradle config 2025-05-13 14:42:05 +01:00
Chris Smowton
163a403065 Add Kotlin 2.2.0-Beta1; drop Kotlin 1.5 2025-05-13 14:42:04 +01:00
Chris Smowton
08aad90346 Add 2.2.0-Beta1 deps 2025-05-13 14:42:02 +01:00
Ian Lynagh
cec503eecd Kotlin: Fix build with 2.1.20-Beta1 2025-01-20 14:31:58 +00:00
Ian Lynagh
4e798b3db4 Kotlin: Add 2.1.20-Beta1 2025-01-20 14:31:57 +00:00
Ian Lynagh
ff328d6c04 Kotlin: Add 2.1.20-Beta1 deps 2025-01-20 14:31:57 +00:00
Ian Lynagh
dedb0cb11f Kotlin: Support CODEQL_PATH_TRANSFORMER 2025-01-03 16:02:36 +00:00
Cornelius Riemenschneider
53ca5083a9 Upgrade bazel to 8.0.0.
Previously, we were using 8.0.0rc1.
In particular, this upgrade means we need to explicitly
import more rules, as they've been moved out of the core bazel repo.
2024-12-10 12:05:37 +01:00
Chris Smowton
81ff394533 Be explicit about Kotlin database type 2024-11-01 19:02:28 +00:00
Chris Smowton
5d3f723df9 Kotlin extractor: use special <nulltype> for null literals
This matches the Java extractor's treatment of these literals, and so enables dataflow type-tracking to avoid special-casing Kotlin. Natively, Kotlin would regard this as kotlin.Nothing?, the type that can only contain null (kotlin.Nothing without a ? can take nothing at all), which gets Java-ified as java.lang.Void, and this will continue to be used when a null type has to be "boxed", as in representing substituted generic constraints with no possible type.
2024-11-01 16:14:10 +00:00
Ian Lynagh
8ab52dba83 Kotlin: Don't write the erasure relation
It's no longer used
2024-10-29 11:32:18 +00:00
Ian Lynagh
196baa99b2 Merge pull request #17769 from igfoo/igfoo/2.1.0-beta2
Kotlin: Fix for 2.1.0-Beta2
2024-10-15 14:56:55 +01:00
Ian Lynagh
b5bfd06624 Kotlin: Fix for 2.1.0-Beta2
We need to catch a different exception now.
2024-10-15 13:17:26 +01:00
Ian Lynagh
156ddd3fae Kotlin: Log our verbosity level
This happens at `info` level, which is logged by default.
2024-10-11 14:24:25 +01:00