Commit Graph

100308 Commits

Author SHA1 Message Date
Dmitriy Dolovov dd8eedb8da [PL] Fix: Don't try to implement non-implemented overridden callables in case of inheritance delegation to Nothing 2023-04-18 09:22:51 +00:00
Dmitriy Dolovov 16da1af525 [PL] Support handling IR error types 2023-04-18 09:22:50 +00:00
Dmitriy Dolovov 161c3fccb6 [PL] Enable partial linkage by default
#KT-51447
#KT-51443
2023-04-18 09:22:50 +00:00
Sebastian Sellmair 5d0bf2de24 [CLI] Restore K2JVMCompilerArguments.classpath and javaModulePath
to support IDEs < 2023.2

Reverts:
- 9dcd40d7b7
- fb66764c4d

KTIJ-25227
2023-04-18 09:18:10 +00:00
Sebastian Sellmair 7fe3c5c423 [Gradle] Demote FakeK2NativeCompilerArguments deprecation to 'WARNING'
KTIJ-25227
2023-04-18 09:18:10 +00:00
Sebastian Sellmair 0f5f4fd8fa [Gradle] Overwrite setupCompilerArgs methods in compile tasks...
... to ensure compatibility with reflection code
in IDEs < 2023.2 which is looking for setupCompilerArgs methods
with specific compiler arguments type instead of a
generic function

KTIJ-25227
2023-04-18 09:18:10 +00:00
Sebastian Sellmair 9309a864ce [Gradle] IdeCompilerArgumentsResolver: Do not resolve compile tasks DependencyClasspath
as it is not needed for JPS builds.
JPS will build the classpath by reading the IJ project model.
Classpath entries added as freeCompilerArgs will still be forwarded

KTIJ-25227
2023-04-18 09:18:09 +00:00
Sebastian Sellmair 62df30134f [Gradle][Minor] CompilerArgumentAware: Remove unnecessary suppress 2023-04-18 09:18:09 +00:00
Alexander Korepanov 980d83eccd [JS IR IC] Drop incremental cache after updating a klib set
Enabled Partial Linkage may replace entire IR expressions with a stub
during klib linking and loading. This may break the incremental cache
dependency graph. Dropping incremental cache files after updating klibs
(e.g. update klib version) covers almost all cases which
could not be tracked due to a broken dependency graph.

This patch could be reverted after fixing KT-57347
2023-04-18 09:06:07 +00:00
Justin Paupore c9badd14a7 Split Parcelize for-ide support by frontend.
Create new targets for K1 and K2-specific jars for the IDE. (These
contain the diagnostics classes generated by the plugins, used to target
quickfixes.)

The existing `parcelize-compiler-plugin-for-ide` target remains
untouched with a K1 JAR dependency, because IJ currently depends on
this. Once IJ is cleaned up, we can remove the K1 reference from that
target, leaving only code shared between frontends.

^KT-57795
2023-04-18 09:11:00 +02:00
Vladimir Sukharev ca740a4baf [K2/N] Re-enable special backend checks
^KT-55598

Merge-request: KT-MR-9625
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-04-18 03:37:47 +00:00
Mikhail Glukhikh bde0282fb1 K2: extract constant from Java enum entry properly
#KT-58002 Fixed
2023-04-17 21:05:04 +00:00
Mikhail Glukhikh 0a126a173e K2: reproduce KT-58002 2023-04-17 21:05:03 +00:00
Mikhail Glukhikh 5cff8c15ab K2: fix intrinsic analysis in FirToConstantValueChecker
#KT-57986 Fixed
2023-04-17 20:53:31 +00:00
Mikhail Glukhikh c826c7301c K2 JS/Native: reproduce KT-57986 2023-04-17 20:53:30 +00:00
Ivan Kochurkin beaeb405d2 [K2, MPP] Build expect-actual map for type parameters from functions
^KT-57181 Fixed
2023-04-17 19:55:35 +00:00
Ivan Kochurkin 3a60b30dae Minor: IrActualizationResult -> IrActualizedResult 2023-04-17 19:55:35 +00:00
Ivan Kochurkin b7bb9c317f [K2, MPP] Introduce FunctionDefaultParametersActualizerVisitor and use it in FunctionDefaultParametersActualizer
^KT-57263 Fixed
2023-04-17 19:55:34 +00:00
Ivan Kochurkin 1073797ed3 [IR] Extract ActualizerSymbolRemapper and ActualizerVisitor from ExpectActualLinker
It will provide the possibility to use them not only locally

Clarify code of IrActualizer pipeline
2023-04-17 19:55:34 +00:00
Mikhail Glukhikh 2ccad553e6 K1/K2: allow to apply suspend modifier to anonymous function
#KT-57991 Fixed
2023-04-17 18:05:44 +00:00
Mikhail Glukhikh 0dbf698653 K1: count anonymous function as function expression in checkers
Related to KT-57991
2023-04-17 18:05:44 +00:00
Mikhail Glukhikh c8b74e5655 K2: reproduce KT-57991 2023-04-17 18:05:43 +00:00
Nikita Bobko 5a96754aec Shift ReferencesToSyntheticJavaProperties feature release from 1.9 to 2.1
Other related tests:
- testGenericJavaProperty
- testFunInterfaceConstructorReference

Meta issue: KT-8575
Review: https://jetbrains.team/p/kt/reviews/9595

UnsupportedSyntheticCallableReferenceChecker only existed for K1,
because we wanted to release the feature for 1.9 and the feature should
have been working for K2 unconditionally. But since, we're postponing
the release until 2.1, we also need to port the checker from K1 to K2
2023-04-17 17:42:01 +00:00
Zalim Bashorov 521a272acb [Wasm] Pass js stack value directly when replacing a wasm exception with JS one
In this case, we don't need to convert a value to and from wasm String.
2023-04-17 16:15:22 +00:00
Zalim Bashorov 6bfd1e7e9f [Wasm] Stop using unsigned numbers in ScopedMemoryAllocator
It turned out that using unsigned numbers is heavy both in terms of size and performance.
We can consider switching back (KT-58041) as soon as we implement unsigned numbers and operations using wasm built-in capabilities (KT-58039).
2023-04-17 16:15:22 +00:00
Zalim Bashorov c114afb55d [Wasm] export __callFunction_* only when a respective closure/lambda converter is used 2023-04-17 16:15:21 +00:00
Mads Ager 699ad87be2 [KAPT+IR] Use ErrorType for unresolved delegate class.
^KT-57946
2023-04-17 16:49:11 +02:00
Yahor Berdnikau 1801277a0c Add newly published compiler plugins as a requirement for KGP tests
^KT-52811 Fixed
2023-04-17 14:40:51 +00:00
Yahor Berdnikau 1eb27f2aac Update publishing and usage of kotlin-annotation-processing plugin
- removed 'kotlin-annotation-processing-gradle' publication as it
duplicated 'kotlin-annotation-processing-embeddable'
- removed 'kotlin-annotation-processing-maven' as it is embedded into
  'kotlin-maven-plugin'. Instead 'kotlin-maven-plugin' now depends on
  'kotlin-annotation-processing' directly.

^KT-52811 In Progress
2023-04-17 14:40:51 +00:00
Yahor Berdnikau a58d6fd13a Publish 'kotlinx-serialization-compiler-plugin' separately
- Also publish 'kotlinx-serialization-compiler-plugin-embeddable' to be
used with 'kotlin-compiler-embeddable'.
- Now Serialization Maven and Gradle plugins do not embed plugin into
itself, but declare on published one normal dependency.
- 'kotlin-serialization-unshaded' publication is deprecated.

^KT-52811 In Progress
2023-04-17 14:40:50 +00:00
Yahor Berdnikau 78c94b65b9 Change sam-with-receiver plugin to use published compiler plugin
- also publish 'kotlin-sam-with-receiver-compiler-plugin-embeddable' to
  be used with 'kotlin-compiler-embeddable'
- 'kotlin-maven-sam-with-receiver' now just adds
  'kotlin-sam-with-receiver-compiler-plugin' as normal dependency
  instead of embedding it into itself

^KT-52811 In Progress
2023-04-17 14:40:50 +00:00
Yahor Berdnikau a58266050f Publish noarg compiler plugin separately
- also publish 'kotlin-noarg-compiler-plugin-embeddable' to be used with
  'kotlin-compiler-embeddable'
- 'kotlin-noarg-maven' plugin now just adds
  'kotlin-noarg-compiler-plugin' as normal dependency instead embedding
  it into itself

^KT-52811 In Progress
2023-04-17 14:40:50 +00:00
Yahor Berdnikau 1a4d203d1c Publish lombok compiler plugin separately
- also add 'kotlin-lombok-compiler-plugin-embeddable' to be used with
  'kotlin-compiler-emebeddable'
- 'kotlin-maven-lombok' does not try to embed plugin into itself and
  just depends on compiler plugin as normal dependency

^KT-52811 In Progress
2023-04-17 14:40:50 +00:00
Yahor Berdnikau 5e41cbda75 Change kotlin-assignment plugin to use published compiler plugin
^KT-52811 In Progress
2023-04-17 14:40:49 +00:00
Yahor Berdnikau 1ccd7afde7 Publish allopen compiler plugin separately
- added also 'kotlin-allopen-compiler-plugin-embeddable' to be used with
  'kotlin-compiler-embeddable'
- 'kotlin-maven-allopen' now just depends on
  'kotlin-allopen-compiler-plugin' instead of "embeding" it into itself

^KT-52811 In Progress
2023-04-17 14:40:49 +00:00
Yahor Berdnikau 64f8b87b66 Publish atomicfu compiler plugin separately
- rename plugin into 'kotlin-atomicfu-compiler-plugin'
- add 'kotlin-atomicfu-compiler-plugin-embeddable' to be used with
  'kotlin-comiler-embeddable'

^KT-52811 In Progress
2023-04-17 14:40:49 +00:00
Yahor Berdnikau 8ad67faa60 Resolve also transitive dependencies for compilerPluginClasspath in maven
This allows to depend on actual compiler plugin instead of embedding it into maven compiler plugin.

^KT-52811 In Progress
2023-04-17 14:40:48 +00:00
Yahor Berdnikau e1bd7d7b5d Add methods to also embed sources and javadoc from embedded dependencies
Introduced approach is not ideal as it introduces direct inter-project
call breaking project isolation. But proper solution requires quite a
lot of changes and should be done separately.

^KT-52811 In Progress
2023-04-17 14:40:48 +00:00
Nikolay Krasko cdec1e6c62 Update used based image for Kotlin builds 2023-04-17 13:33:51 +00:00
Nikolay Krasko a5876811d8 Instruction for 1.8.20 build 2023-04-17 13:33:50 +00:00
Dmitrii Krasnov 9c32a66e9c migrated NativeExternalDependenciesIT to gradle TestKit 2023-04-17 13:22:25 +00:00
Svyatoslav Scherbina 8466bec048 Native: fix ring benchmark compilation error
`@file:OptIn` can't be applied to a class. Change it to `@OptIn`.
2023-04-17 13:03:13 +00:00
Abduqodiri Qurbonzoda 12f7a6de3e [K/N] Experimental ByteArray.get/setPrimitiveAt(index) functions
As a part of Native stdlib stabilization efforts.

Merge-request: KT-MR-9346
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-17 12:42:31 +00:00
Evgeniy.Zhelenskiy aceab2ac1f [IR] Fix KT-57973
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-57973
2023-04-17 12:33:10 +00:00
Abduqodiri Qurbonzoda e7225d29ff [K/N] Mark unit testing API with ExperimentalNativeApi
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-17 12:30:42 +00:00
Evgeniy.Zhelenskiy 8c748bfea4 [IR] Add more tests for inline/value classes secondary constructors
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-55333
2023-04-17 12:10:14 +00:00
Abduqodiri Qurbonzoda f75b72990e [K/N] Deprecate SuspendFunction interface with WARNING
As a part of efforts to stabilize Native stdlib.
2023-04-17 12:01:55 +00:00
Jinseong Jeon fbe558a0de AA FIR: handle smartcasted arg when building call's argument mapping
^KTIJ-25112 Fixed
2023-04-17 13:57:08 +02:00
Yahor Berdnikau 86540bdbb4 [Gradle] Fix flaky test
Commonizer may run first and produce compiler arguments output as well
in test output.
2023-04-17 11:45:57 +00:00
Marco Pennekamp 73d99019bd [AA] KT-57515 Add createCompositeModificationTracker 2023-04-17 11:20:52 +00:00