Commit Graph

98753 Commits

Author SHA1 Message Date
Denis.Zharkov fe5adab652 K2: Avoid inference diagnostics when arguments are already error typed
For example, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER

It became especially relevant after 0e84bf2053
that together with later commits bring a lot of unnecessary
NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER diagnostic
2023-02-15 08:13:41 +00:00
Igor Chevdar 564b40f05d [K/N] Fixed resolve order of compiler caches
#KT-56611 Fixed
2023-02-15 07:06:05 +00:00
Igor Chevdar 951ebf4082 [K/N] Added a test for KT-56611 2023-02-15 07:06:05 +00:00
Ilya Gorbunov 3d05565b99 Remove tasks for zipping compiler testdata and stdlib test sources 2023-02-14 23:37:32 +00:00
Sergey.Shanshin 498c1abbc6 [KxSerialization] Fix SERIALIZER_NOT_FOUND diagnostic for enums
If enum class from dependencies is used, which was compiled by a new version of the plugin, which uses a factory and does not create a nested `$serializer` class, then an `SERIALIZER_NOT_FOUND` diagnostic error is thrown for such an enumeration.
This happens if the old serialization runtime is used for the current project - in this case, the serializer is taken from the nested class `$serializer`. Since it is missing, the diagnostics does not work correctly.
It is acceptable for enumerations to ignore this error, because we know that enumerations are always serializable.

Merge-request: KT-MR-8818
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
2023-02-14 22:10:30 +00:00
Sergey.Shanshin c9b8160f1e [kxSerialization] Added diagnostic on useless Serializer annotation
Resolves Kotlin/kotlinx.serialization#2182

Merge-request: KT-MR-8718
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
2023-02-14 22:00:33 +00:00
Vladimir Sukharev 3124154aef [K2/N] Fix false negative interop_objc_kt55938 under K2
Merge-request: KT-MR-8817
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-14 20:32:45 +00:00
Vladimir Sukharev 255d4fa829 [K/N] Don't reuse irGet node in cleanerField tree
Merge-request: KT-MR-8831
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-14 20:31:13 +00:00
Dmitriy Novozhilov 8e3022452e [FIR] Unify diagnostic message in FIR dump for syntax error between PSI and LT 2023-02-14 17:08:55 +00:00
Dmitriy Novozhilov aef9b129d2 [FIR] Add regression tests for number of issues fixed in K2
List of issues:
KT-4113,  KT-6822,  KT-7389,  KT-17817, KT-20223
KT-21463, KT-24503, KT-24737, KT-24779, KT-24901
KT-27261, KT-28668, KT-30497, KT-30756, KT-36958
KT-37365, KT-37490, KT-38288, KT-41038, KT-41721
KT-42136, KT-42169, KT-42449, KT-42715, KT-43553
KT-43603, KT-43846, KT-43936, KT-46288, KT-46301
KT-47373, KT-47484, KT-47490, KT-47495, KT-47750
KT-47815, KT-47870, KT-48975, KT-49024, KT-49045
KT-50134, KT-50160, KT-50550, KT-51045, KT-51143
KT-51796, KT-52262, KT-52424, KT-52860, KT-52934
KT-53086, KT-53494, KT-53671, KT-53752, KT-53819
KT-54478, KT-54518, KT-54931, KT-54990, KT-55138
KT-55379, KT-55555, KT-56243
2023-02-14 17:08:55 +00:00
Dmitriy Novozhilov 8ae5213155 [FIR] Add tests for KT-50386 and KT-50646 2023-02-14 17:08:54 +00:00
Dmitriy Novozhilov 092ebf4c11 [FIR] Add test for KT-49249 2023-02-14 17:08:54 +00:00
Dmitriy Novozhilov 019d7db737 [FIR] Add regression test for KT-44392
Also related to KT-56615
2023-02-14 17:08:53 +00:00
Dmitriy Novozhilov 197f19c627 [FIR] Add test for KT-43619 2023-02-14 17:08:53 +00:00
Roman Golyshev b23aabf6e0 [Analysis API] KTIJ-24610 Ignore qualifiers with fake source in KtFirImportOptimizer
Such qualifiers can appear for extensions imported from objects

^KTIJ-24610 Fixed
2023-02-14 16:08:40 +00:00
Anton Lakotka 515a401b23 [Gradle, Test] separate lib publication and app assemble to different builds
To prevent build failures due to race conditions
with publication and consumption
2023-02-14 15:15:12 +00:00
Anton Lakotka 96ba03a708 [Gradle] Move configureMDConfigurations to resolvableMetadataConfiguration 2023-02-14 15:15:12 +00:00
Sebastian Sellmair 25f6b4c922 [Gradle][Minor] Make collectAllProjectStructureMetadataInCurrentBuild private
^KT-56431 Verification Pending
^KT-56461 Verification Pending
2023-02-14 15:15:11 +00:00
Sebastian Sellmair 8f4dd86788 [Gradle] Move KotlinSourceSet metadata configuration into separate source file
^KT-56431 Verification Pending
2023-02-14 15:15:11 +00:00
Sebastian Sellmair f21e08f6b9 [kotlin-tooling-core] Add extrasNullableLazyProperty API
^KT-56431 Verification Pending
2023-02-14 15:15:11 +00:00
Sebastian Sellmair b646a43dab [Gradle] ResolvableMetadataConfigurationTest: Check ide dependencies
^KT-56461 Verification Pending
2023-02-14 15:15:10 +00:00
Sebastian Sellmair 0a2b873415 [Gradle] GranularMetadataTransformation: Support dependency constraints
^KT-56431 Verification Pending
^KT-56461 Verification Pending
2023-02-14 15:15:10 +00:00
Sebastian Sellmair 380ca95661 [Gradle] resolvableMetadataConfiguration: Ensure consistent resolution across all compile dependencies
^KT-56461 Verification Pending
^KT-56431 Verification Pending
2023-02-14 15:15:10 +00:00
Anton Lakotka 5ec153822a [Gradle] Replace provider by lazy in ProjectData 2023-02-14 15:15:09 +00:00
Anton Lakotka 0bee621b21 [Gradle] Minor: optimize imports 2023-02-14 15:15:09 +00:00
Anton Lakotka 737afcb343 [Gradle] Move creation of GranularMetadataTransformation to source set
Now it is encapsulated to DefaultKotlinSourceSet and is lazily created
upon demand during project import

But metadata configurations still should be created during metadata
target configuration.

^KT-56431 Verification Pending
2023-02-14 15:15:09 +00:00
Anton Lakotka db6c6c736a [Gradle] Cache data that collected from all projects in rootProject 2023-02-14 15:15:08 +00:00
Vladimir Sukharev babd52e27a [K2/N] Fix test on Windows: remove \r from compared strings
Address reviewer's comment

Fix test on Windows: remove \r from compared strings

Merge-request: KT-MR-8799
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-14 14:46:27 +00:00
Yunir Salimzyanov ee32fddbfe KT-55700: fix IDEA import with JPS build enabled 2023-02-14 13:43:58 +00:00
Leonid Startsev 80ad6a4cd7 Support plugin intrinsics for serializer() function in K2.
- Add IrPluginContext to JvmBackendContext, so plugin intrinsics can
reference external functions properly.

- Do not use module.findClassAcrossModuleDependencies as Descriptor API does not work for FIR.

- Add asm listing tests in serialization plugin for K2

- Remove Delegated.kt asm listing test as we have similar test in boxIr group.

#KT-56553 Fixed
2023-02-14 13:43:09 +00:00
Alexander Korepanov 121c920099 [JS IR IC] Load only top level signatures for function type interfaces
The dependency signature may refer to function type interface properties
 (e.g. name) or methods. It is impossible to detect (without hacks)
 which binary symbol for loading is required. However, when loading
 a property or a method the entire function type interface is loaded.
 And vice versa, a loading of function type interface loads
 properties and methods as well. Therefore, load the top level signature only,
 it must be the signature of function type interface.

^KT-56582 Fixed
2023-02-14 13:25:19 +00:00
Alexander Korepanov f367541393 [JS IR] Rename functionalInterface -> functonTypeInterface 2023-02-14 13:25:19 +00:00
Pavel Kunyavskiy 00c900cb49 [K/N] Optimize code generation for function references
In before, each function reference created 5 functions needed only
for equals/hashcode properties. It contributed arround 3.5% of code size
on several sample projects. This is now replaced by passing constant
object to base class constructor.
2023-02-14 13:00:47 +00:00
Mikhail Glukhikh 7d8a1e9c1c Delay EnhanceNullabilityOfPrimitiveArrays to version 2.0
See KT-54521
2023-02-14 11:52:00 +00:00
Nikolay Krasko 2ad567e14c Revert "[K/N][build] Cleanup obsolete build tasks"
This reverts commit a9cae3fe87.
2023-02-14 11:30:17 +00:00
Aleksei.Cherepanov 0470a9568d [Maven] Fix flaky test-plugins
Logging in maven has been slightly changed, so it no longer matches the old patterns. It was flaky because sometimes it loaded the plexus artifact (and sometimes it didn't) and such event was shown in the log with different log message
2023-02-14 10:09:52 +00:00
Igor Chevdar ba172358d8 [K/N] Option to specify IR validation severity 2023-02-14 07:30:47 +00:00
Igor Chevdar 4fd063bd4b [K/N][driver] Some tweaks in IrValidator setup 2023-02-14 07:30:46 +00:00
Igor Chevdar 95c4ded9d0 [K/N][IR] Fixed wrong IrCall type (to fix IR validation) 2023-02-14 07:30:46 +00:00
Igor Chevdar 0655b02097 [IR] Proper error message for IR validation 2023-02-14 07:30:46 +00:00
Igor Chevdar 1e8cd91e0f [IR] Fixed wrong IrCall type (to fix IR validation) 2023-02-14 07:30:45 +00:00
Igor Chevdar 18e213426c [IR] Fixed wrong IrConst type (to fix IR validation) 2023-02-14 07:30:45 +00:00
Igor Chevdar 3dad0cfb05 [IR] Fixed wrong IrCall type (to fix IR validation) 2023-02-14 07:30:45 +00:00
Igor Chevdar 5e6aa649ed [IR] Extracted implicitCastIfNeeded to common utils 2023-02-14 07:30:44 +00:00
Igor Chevdar 750bb5c8c4 [K/N][IR] Added proper parent 2023-02-14 07:30:44 +00:00
Igor Chevdar ea2ce2b52e [IR] Fixed wrong parents 2023-02-14 07:30:44 +00:00
Denis.Zharkov 427b221eaf K2: Get rid of redundant parameter of ConeCallConflictResolver methods
discriminateGenerics was only set to false in recursive calls of
ConeOverloadConflictResolver
2023-02-14 07:14:10 +00:00
Ilya Gorbunov 61e9f98b9f Load JDK 8 platform implementations class without reflection
Also remove search for other platform implementation classes because
now the first match should be found in the same jar

Helps to avoid GraalVM related reflection problems in KT-51579
2023-02-13 20:25:30 +00:00
Yunir Salimzyanov 3cb0d489bf KT-55700: fix kotlin-test-sources.jar in compiler lib
to contain both jvm and common parts
as it is made for maven artifacts distribution
2023-02-13 17:42:27 +00:00
Dmitrii Gridin 607b8f6b61 Revert "[SLC] Support generics and ignore whitespace in KtSuperTypeList.findEntry"
This reverts commit e77f5c7764.
2023-02-13 17:28:35 +01:00