Commit Graph

100571 Commits

Author SHA1 Message Date
Sebastian Sellmair 476c209bf4 [Gradle] Remove kotlinx.coroutines from KGP compile classpath
- Replace CompletableDeferred with a simple 'Completable'
- Replace withContext usage for 'withRestrictedStages' with custom
implementation

^KT-58162 Verification Pending
2023-04-24 15:45:24 +00:00
Ilya Goncharov 97d6b71654 [Gradle, JS] Remove unnecessary warning about multiple versions
^KT-56458 fixed

Merge-request: KT-MR-9747
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2023-04-24 15:32:15 +00:00
Aleksei.Cherepanov 2e453051f9 Add cache comparator for incremental gradle tests
Add logic that rebuilds all sources after the last incremental round of each Gradle IC test and compares caches. The same was already implemented for JPS, but not for Gradle. After all rounds of incremental compilation are completed, another clean build from scratch is produced. All caches after the rebuild are compared with the caches of the last round of incremental compilation. This check is necessary because incremental compilation artifacts should depend on the state of the project, source files, and configuration, and not the chain of changes and incremental builds that led to this state. After the launch, there were several tests that did not satisfy the above conditions, and were muted  (KT-56681, KT-55195, KT-56242, KT-56698)

#KT-54991 In Progress
2023-04-24 14:54:45 +00:00
Aleksei.Cherepanov ae8428e8d0 Refactor Infrastructure of IC tests
1) Move root util functions to separate CompileRunnerUtils file from IncrementalJvmCompileRunner to leave the only class instance there and to separate util functions
2) Move TestLookupTracker from the abstract parent class location to a separate file as an implementation class
3) Small change naming of building functions just to clarify what they do
4) Some small code-style refactorings
2023-04-24 14:54:45 +00:00
Dmitrii Gridin 02abafd98d [FIR] do not request lazy resolve on isActual and isExpect for symbols 2023-04-24 14:47:21 +00:00
Kirill Rakhman 7f46225bed [FIR] Set correct constraint position for callable reference
This fixes a false positive resolution error for callable references
to functions with a type parameter that's annotated with
@OnlyInputTypes.

#KT-57994 Fixed
2023-04-24 14:04:50 +00:00
Dmitrii Gridin 89acaae819 [LL FIR] RawFirNonLocalDeclarationBuilder: improve diagnostics 2023-04-24 14:01:57 +00:00
Artem Kobzar 9bcfd093c5 [K/JS] Remove super keyword insertion if the body of method was moved into another place (private methods, lambdas, coroutines) ^KT-57990 Fixed 2023-04-24 13:54:36 +00:00
Pavel Kunyavskiy e63ed03d19 K2: Consolidate value parameter annotations handling in Fir2Ir
Value parameters annotations are now handled consistently in
factory functions creating this IrValueParameter instances.
In before, it was handled in several different places, which leads to
being sometimes lost, e.g. in LazyFirSimpleFunction.

This caused original problem in interop checks.

^KT-58099
2023-04-24 13:36:36 +00:00
Abduqodiri Qurbonzoda ad5593e68a [K/N] Mark Platform-related API with ExperimentalNativeApi
As part of stabilizing Native stdlib.
2023-04-24 13:29:02 +00:00
Alexander Udalov f04d01cf21 JVM IR: fix behavior of Enum.entries for unlowered enums
#KT-57671 Fixed
2023-04-24 12:43:43 +00:00
Alexander Udalov 449c866c7a JVM IR: minor, fix enum lowering kdoc
invokedynamic-based logic was removed in 562b27db4e.
2023-04-24 12:43:43 +00:00
Anton Lakotka 081e006006 [Gradle] Test that nullability is correctly inferred in metadata compilation
^KT-56380
2023-04-24 11:58:15 +00:00
Anton Lakotka 2137d26ce8 [Gradle] Test that extra jvm compilation can be created with java enabled
^KT-41506 Verification Pending
2023-04-24 11:58:15 +00:00
Dmitrii Gridin 2a00be916a [SLC] SymbolLightAccessorMethod: avoid symbol restoring on isValid
^KTIJ-25108 Fixed
2023-04-24 11:53:36 +00:00
Alexander Udalov 9ec78e1aa9 K2: remove JAVA_SHADOWED_PROTECTED_FIELD_REFERENCE error
This is a partial revert of 949a39b80f. In the end it turned out not
necessary to prohibit this case (and perform a breaking change), because
JVM backend was fixed to generate it correctly in d73d3c46e2.

 #KT-55307 Declined
 #KT-55846 Declined
2023-04-24 11:45:55 +00:00
Dmitrii Gridin 0ccae0d4c6 [SLC] unmute some tests 2023-04-24 11:42:06 +00:00
Jinseong Jeon 8544081c46 SLC: enable enum test case 2023-04-24 11:42:06 +00:00
Ilya Goncharov 5763acbd31 [Gradle, JS] Remove useCoverage fun
^KT-58199 fixed
2023-04-24 11:39:06 +00:00
Ilya Kirillov e32bcc2c83 Move IDE extension points from compiler.xml to the IDE repository
And remove `org.jetbrains.kotlin.moduleBuilder` as it's not used anymore

^KTIJ-25304 fixed
2023-04-24 09:25:13 +00:00
Dmitriy Novozhilov 2087a7c899 [FIR] Store generated declarations in the session component
Also extract generated declarations for classes from declaration site
  session, not use site

^KT-57821 Fixed
2023-04-24 09:22:30 +00:00
Dmitriy Novozhilov c6f5cf3e62 [FIR] Rename FirGeneratedClassDeclaredMemberScope.kt to FirGeneratedScopes.kt 2023-04-24 09:22:30 +00:00
Igor Chevdar 3e0196da89 [K/N][IR] Used liveness analysis in the coroutines lowering
Liveness analysis results are used for spilling variables before
suspending a coroutine
2023-04-24 09:57:16 +03:00
Igor Chevdar 4e661a6337 [IR] Liveness analysis
Compute actually used variables for specified IR nodes
2023-04-24 09:57:06 +03:00
Igor Chevdar 6a79163205 [K/N][IR] Extracted a common util function 2023-04-24 09:36:43 +03:00
Igor Chevdar cf58e5ff9f [K/N] Extracted some common BitSet utils 2023-04-24 09:36:43 +03:00
Anton Bannykh c839fdca3e [JS IR] initial support for KLIB incremental compilation with K2 2023-04-23 14:47:48 +02:00
Zalim Bashorov a9683bd4a8 Wasm: temporary force keeping Unit_getInstance in DCE 2023-04-22 17:41:23 +00:00
Zalim Bashorov 77491ded1b Use Array constructor with size to create Array of nulls
Change the constructor visibility from public to private as it should be.
2023-04-22 17:41:23 +00:00
Mads Ager a6520a294b [K2] Local property accessors are always default. 2023-04-21 23:40:41 +02:00
Mads Ager 3795fc1106 [K2] Fix stable parameter name metadata. 2023-04-21 23:40:41 +02:00
Mads Ager 3a8f1ca690 [K2] Type parameter metadata handling. 2023-04-21 23:40:41 +02:00
Mads Ager 73191ff9bc [K2] Add version requirement for definitely non-null types to metadata. 2023-04-21 23:40:40 +02:00
Mads Ager 1f3b8142a8 [K2] Enable tests for hasConstant field on properties in metadata. 2023-04-21 23:40:40 +02:00
Mads Ager f7171f01ae [K2] Enable tests for metadata for nested types. 2023-04-21 23:40:40 +02:00
Dmitrii Gridin 63e6816a50 [LL FIR] avoid body resolve on attempt to build symbol for type parameters
^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 5a53d796e1 [LL FIR] add more tests on lazy resolve for type parameters
^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 9fe77d6a56 [LL FIR] avoid body resolve on attempt to build symbol for parameters
^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 3394097f47 [LL FIR] run lazy resolve tests by caret
To test production resolveToFirSymbol entry point

^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 6b3e49e824 [AA FIR] correctly restore declaration with annotation with argument inside some type from symbol pointer
ConeAttributes can have some non-stable info, so we shouldn't render it

Also reduce resolve from IMPLICIT_TYPES_BODY_RESOLVE to TYPES where it is possible

^KT-58141 Fixed
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 866e8a26c7 [FIR] set correct resolve phase for default getter, setter and backing field
^KT-58163 Fixed
2023-04-21 17:21:17 +00:00
Pavel Punegov 1703d3a47e [K/N][test] Skip test worker10 with Aggressive GC
Merge-request: KT-MR-9729
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-04-21 17:02:32 +00:00
Kirill Rakhman 0a2477585a [FIR] Implement DEFINITELY_NON_NULLABLE_AS_REIFIED diagnostic
#KT-55646 Fixed
2023-04-21 16:23:16 +00:00
Svyatoslav Scherbina 509a97a7b5 Native: add coroutines into buildSrc classpath of performance builds
^KT-58160
2023-04-21 16:19:55 +00:00
Svyatoslav Kuzmich 933f47aaf9 [Wasm] Rename JsHandle to JsReference
Decision to do this was made at Kotlin/Wasm interop design meeting
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7ba8f7cce2 Revert "[Wasm] Deprecate @JsFun with warning"
Reason: Design of js(code) replacement is still in flux.
        It would be better to delay deprecation until we converge
        to proper solution.

This reverts commit 3566d918d2.
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7c2fa3290e [Wasm] Revert removal of some Dynamic functions
Deprecate them with ERROR instead to improve compiler messages
2023-04-21 15:03:19 +00:00
Yahor Berdnikau eb4e96a113 Add kotlin-build-tools-enum-compat workaround
It acts as a workaround for the case when build tools or dependencies
are compiled with latest 'kotlin-stdlib' version, but at a runtime older
 'kotlin-stdlib' is provided, which does not know about new
 `EnumEntries`.

 ^KT-57317 Fixed
2023-04-21 14:57:17 +00:00
Pavel Mikhailovskii 1f649b698c [CLI] Get rid of unnecessary type parameters in arguments.kt 2023-04-21 13:21:28 +00:00
Nikolay Krasko 13ce25a85c [213] Update verification for "maven-resolver-impl" and "httpclient"
KTI-1114
2023-04-21 13:19:05 +00:00