Commit Graph

103064 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda df16fa3306 [K/N] Regex matching zero length should split surrogate pairs #KT-57401
Merge-request: KT-MR-11110
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-07-26 14:19:25 +00:00
Pavel Mikhailovskii 7ecd7b8e61 [KAPT] Refactor Kapt 3 components for reuse in Kapt 4 (KT-51982)
- make some utility functions and classes public
- split some classes into common and Kapt 3 - specific parts
- use Kapt 4-ready filtering of @Metadata annotations in tests
2023-07-26 14:03:14 +00:00
Yan Zhulanow c702f00399 [LL API] Avoid implicit types in stub-decompiled annotations 2023-07-26 13:02:46 +00:00
Ilya Goncharov 1f9af4b452 [Gradle, JS] Fix cli tests for ir
KT-60495
2023-07-26 12:51:37 +00:00
Yahor Berdnikau 3b878336dd [Gradle] Fix additional java resource dirs are erased on KGP/Jvm plugin apply
User scripts may apply KGP/Jvm plugin not immediately in 'plugins {}'
block. And a script may also already add some additional resources into
a java source set before plugin apply. On apply plugin has erased such
additionally configured resource dirs as it assumed only the default one
are set. Now it also syncs them.

^KT-60459 Fixed
2023-07-26 12:50:51 +00:00
Yahor Berdnikau 11cefc52a7 [Gradle] Introduce ResourcesIT test suite
This suite will check how resources are handled in the plugin.

^KT-60459 In Progress
2023-07-26 12:50:51 +00:00
Dmitrii Gridin 3518aa5898 [LL FIR] ANNOTATIONS_ARGUMENTS_MAPPING: drop intermediate state with lazy arguments
This is safer because we can be sure that no one can
read an intermediate result with lazy expressions (related to KT-60387)

^KT-60552 Fixed
2023-07-26 12:27:16 +00:00
Dmitrii Gridin 65fec8dc19 [LL FIR] StateKeeper: provide context
We need this to be able to construct new elements on the fly
during arrangement

^KT-60552
2023-07-26 12:27:16 +00:00
Pavel Kunyavskiy 38ef5be217 [K/N] Don't store private signatures in symbol table
Refactoring in 4986cb14 introduced an unintentional behavior change:
private symbols are now findable in symbol table with lookup by
signature.

Unfortunately, this is not correct - private symbol signature might not
be unique (or at least was sometimes not unique in older compiler
versions), which leads to crashes on deserializing corresponding klib.

This commit restores old behavior.

^KT-60616
2023-07-26 12:03:26 +00:00
Ilya Kirillov cc27bfd39a [Analysis API] fix "scope for class ConeClassLikeTypeImpl not found exception" when stdlib is missing
^KT-60641 fixed
2023-07-26 10:53:56 +00:00
Ilya Goncharov bfe73567c1 [Gradle, JS] Remove deprecated methods for methods with Action input parameter to be chosen
^KT-60218 fixed

Merge-request: KT-MR-11280
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2023-07-26 10:32:45 +00:00
Abduqodiri Qurbonzoda 86c1e0ded6 Remove reified constraint from Array constructors #KT-57363
This is an attempt to bring consistency to array constructors reified requirement.
Currently,
JVM - reified type in all three: arrayOfNulls, arrayOf, emptyArray
Native - reified in arrayOfNulls and arrayOf, but not in emptyArray
JS & Wasm - reified in arrayOfNulls, but not in arrayOf and emptyArray

Merge-request: KT-MR-11005
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-07-26 10:17:45 +00:00
Ilya Gorbunov 2a24eaeb74 [Docs] Minor api docs improvement 2023-07-26 10:15:45 +00:00
Ilya Gorbunov 865f392681 [Docs] Use absolute urls in links, new Dokka doesn't support relative 2023-07-26 10:15:45 +00:00
Sarah Haggarty 8e537ec67d [Docs] Update time API description 2023-07-26 10:15:45 +00:00
Sebastian Sellmair f883079988 [Gradle] IdeBinaryDependencyResolver: Support opaque file dependencies
^KT-60612 In Progress
2023-07-26 09:50:12 +00:00
Sebastian Sellmair 6c4ce81237 [Gradle] Implement 'KotlinOutputDependency' to retain information about kotlin produced dependencies
^KT-60612 In Progress
2023-07-26 09:50:12 +00:00
Simon Ogorodnik 973c5770b8 Change ownership of kapt4 to Kotlin JVM 2023-07-26 09:26:13 +00:00
Stanislav Erokhin ecbc40cf92 [mpp] Mark Kotlin12XMppDeprecation as FATAL
Old MPP plugins are deprecated for a long time. It is time to report
fatal error for such cases.
Our stdlib still and kotlin-test still using them, so we cannot just
completely remove them, but there is a way to suppress this error:
kotlin.internal.mpp12x.deprecation.suppress=true

Code for the old plugins (together with the remaining testsdata)
will be completely removed once stdlib and kotlin-test
migration completed. ETA: ~ 2.0-Mx

#KT-60553 Verification Pending
2023-07-26 09:25:50 +00:00
Stanislav Erokhin 955520f69e [Gradle] Fix the verbose rendering for FATAL diagnostics
During the tests we are using the verbose way of render the diagnostic
meaning, that we are adding the diagnostic id to the diagnostic message.
And we previously didn't have that for one case, so we were unable to
detect in tests that diagnostic with FATAL severity was reported
2023-07-26 09:25:50 +00:00
Ilya Chernikov 3ee07eb015 Scripting: add test for implicit receivers with the same short name 2023-07-26 08:49:27 +00:00
Ilya Chernikov 3dc94f3d31 Scripting: fix descriptor extraction, restore main-kts testing
Temporary solution for K1 - see comments in the code
it seems that a scenario reproduced in the MainKtsTest.testKt48812
wasn't covered with analogous changes before.
And it wasn't detected while main-kts tests weren't a part of the
K1 scripting tests.
The test is fixed now, and testing of main-kts is restored.
2023-07-26 08:49:27 +00:00
Ilya Chernikov 776cdbcd3f minor: small cleanup in K2 scripting support code 2023-07-26 08:49:27 +00:00
Ilya Chernikov 895a811b47 K2 Scripting: fix capturing from the imported scripts 2023-07-26 08:49:27 +00:00
Ilya Chernikov 1d88c307ea K2 Scripting: fix locality of script declarations
the script declarations are considered public, at least because they
can be reused from another script then used with the `importedScripts`
configuration property. It also improves the compatibility with K1
scripting.
2023-07-26 08:49:27 +00:00
Ilya Chernikov 020a590df7 K2 Scripting: fix order of arguments processing
and base class handling:
Since in K2 we do not distinguish between script arguments taken from
the base class and provided properties, we need this extra functionality
to preserve the argument order of K1 scripts.
This is a temporary measure, since we're going to deprecate base class
usage at some point (KT-60449), so the relevant constructor arguments
should disappear too.
2023-07-26 08:49:27 +00:00
Ilya Chernikov 96bde033e1 K2 Scripting: add support for imported scripts 2023-07-26 08:49:26 +00:00
Ilya Chernikov d24fc3b581 K2 Scripting: add support for result field 2023-07-26 08:49:26 +00:00
Ilya Chernikov 6c7751b0af K2 Scripting: add support for script implicit receivers 2023-07-26 08:49:26 +00:00
Ilya Chernikov 480ea80fc4 Enable K2 scripting tests 2023-07-26 08:49:26 +00:00
Ilya Chernikov 266a223460 Update scripting plugin autoload logic for K2 2023-07-26 08:49:26 +00:00
Ilya Chernikov 0d7a5c6b1b Scripting: fix string script source location
fixes proper script definition discovery for expressions and other
scripts created from a string.
2023-07-26 08:49:26 +00:00
Pavel Kunyavskiy f420b6c709 [K/N] Enable ir verification in interop_objc_smoke
^KT-57716
2023-07-26 08:32:09 +00:00
Pavel Kunyavskiy 0fbc42de03 [K/N] Remove interop_kt49034_objcprotocol test
It doesn't check anything meaningful after d797505f06

^KT-56028
2023-07-26 08:32:09 +00:00
Mikhail Glukhikh 5836a8aa0b K2: add more tests/fix augmented assignment case around KT-59748 2023-07-26 06:09:15 +00:00
Mikhail Glukhikh f20e2dec31 K2: generate Unit conversion for indexed assignment at raw FIR stage
#KT-59748 Fixed
2023-07-26 06:09:15 +00:00
Mikhail Glukhikh 1832413a02 K2: reproduce KT-59748 2023-07-26 06:09:15 +00:00
Mikhail Glukhikh a428ab6ed6 K2: handle alias-based types nullability properly in ConeTypeContext
#KT-60154 Fixed
2023-07-26 06:02:42 +00:00
Nikita Bobko f4ba5aaf9a [FE 1.0] Prohibit implicit Java actualization in K1
^KT-58545 Fixed
Review: https://jetbrains.team/p/kt/reviews/10561

It's not yet supported in K2 KT-59213

Related tests:
- ApiTest.testStdlib
- RuntimePublicAPITest.kotlinStdlibRuntimeMerged
- KotlinProjectViewTestGenerated.test_Arrays (in Kotlin plugin)
2023-07-25 22:30:09 +02:00
Svyatoslav Scherbina d0452d569f Bump Kotlin/Native version in KGP to 1.9.20-dev-7597 2023-07-25 18:12:16 +00:00
Svyatoslav Scherbina dcb34e0ec0 Native: mention cinterop libraries in the ExperimentalForeignApi KDoc
Now (mostly after 3f3f6eb) cinterop adds ExperimentalForeignApi to all
Kotlin declarations it generates from C and Objective-C libraries,
except for the platform libraries.
This commit changes the KDoc for ExperimentalForeignApi to reflect that
change.

^KT-58362
2023-07-25 17:18:00 +00:00
Abduqodiri Qurbonzoda db908aefff Detect concurrent modification of the parent list in subList
As a part of efforts to stabilize Native stdlib.
2023-07-25 16:00:42 +00:00
Abduqodiri Qurbonzoda 0bc74967b5 Rename testThrowsCME to testIteratorThrowsCME in tests 2023-07-25 16:00:42 +00:00
Svyatoslav Kuzmich 384c700a85 [Wasm] Fix access to WebIDL dictionary members
Evaluate external interface companion objects as an empty JS object
instead of null due to null checks on interop boundary.

^KT-59082 Fixed
2023-07-25 15:27:22 +00:00
Abduqodiri Qurbonzoda 92de137cd6 Deprecate HashSet.getElement() and document that it's for ObjC interop.
Will become HIDDEN eventually.

As a part of efforts to stabilize Native #KT-55765.
2023-07-25 15:01:49 +00:00
Abduqodiri Qurbonzoda 7a0af5d058 Mark the CName annotation with ExperimentalNativeApi 2023-07-25 15:01:49 +00:00
Abduqodiri Qurbonzoda e5ab1d9ccf Commonize the ExperimentalNativeApi annotation 2023-07-25 15:01:49 +00:00
Sergey Bogolepov c8a07ae156 [K/N] Keep osVersionMinFlagLd property for compatibility purposes.
Compiler build uses a bit older version of kotlin-native-shared which
still refers to an older property.
This commit should be reverted after compiler update.
2023-07-25 14:30:06 +00:00
Sergey Bogolepov 9daa40d2ed [K/N] Use platform_version instead of sdk_version and os_version_min 2023-07-25 14:30:06 +00:00
Pavel Kunyavskiy 9cbd55aa72 [K/N] Intrinsify enumEntries<T>
^KT-59711
2023-07-25 14:24:44 +00:00