Commit Graph

105608 Commits

Author SHA1 Message Date
Sergej Jaskiewicz fa20e401f8 [IR generator] Rename kdoc -> kDoc property in FieldConfig 2023-10-24 10:29:43 +00:00
Sergej Jaskiewicz 7e7f4811bd [FIR/IR generator] Add kDoc property to AbstractElement & AbstractField 2023-10-24 10:29:43 +00:00
Xin Wang 51325ba630 [IR] Implement getContextReceiverParameters for IrBasedPropertyDescriptor
Fixes: KT-59590
2023-10-24 10:07:08 +00:00
cristiangarcia 03ad981dea Make ClangFrontend cacheable
Co-authored-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>


Merge-request: KT-MR-11479
Merged-by: Cristian Garcia <Cristian.Garcia-Marin@jetbrains.com>
2023-10-24 09:50:02 +00:00
Alexander Shabalin b3e13fb2c2 [K/N] Migrate runtime/collections tests to new testing infra ^KT-61259 2023-10-24 09:27:46 +00:00
Dmitrii Krasnov 10a6d8fd2c [Gradle IT] Added configuration for running IT with k/n from master
[Gradle] Updated kotlin-build-gradle-plugin to 0.0.40

#KT-45978 Ready for Review


Merge-request: KT-MR-12509
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-10-24 08:38:51 +00:00
Nataliya.Valtman 80485809d9 Add runtimeOnly and compileOnly dependencies to FUS
#KT-62617 Fixed
2023-10-24 08:22:28 +00:00
Nataliya.Valtman e66f41da95 Add build report usage to FUS
#KT-62264 Fixed
2023-10-24 08:20:22 +00:00
Roman Golyshev 44d48510b4 KTIJ-26057 [AA] Ignore implicit receivers scope when dealing with types in reference shortener
Implicit receivers generally do not affect the resolution of types.
However, they generate scopes which might contain undesirable
classifiers, which can confuse reference shortener.

Dropping all the implicit receivers when dealing with type references
allows completely avoid such undesirable scopes instead of filtering
them by `instanceof` checks.

Also, temporary move `hasTypeParameterFromParent` check higher to the
`findClassifierElementsToShorten`, because ATM we don't know how to
properly decide whether to shorten the fully-qualified inner types
with implicit parameters or not (see KTIJ-26072).

^KTIJ-26057 Fixed
2023-10-24 07:47:30 +00:00
Kirill Rakhman 65ff684589 [FIR] Don't discriminate generics in conflict resolution for callable references
#KT-59430 Fixed
2023-10-24 07:27:07 +00:00
Igor Chevdar 141dc96067 [gradle][tests] Disabled K/N incremental compilation tests on Windows 2023-10-24 06:02:21 +00:00
Alexander Udalov b5ba9ee671 IR: refactor resolveFakeOverride call sites
Split it to 4 functions for clarity: resolveFakeOverride,
resolveFakeOverrideOrFail, resolveFakeOverrideMaybeAbstract,
resolveFakeOverrideMaybeAbstractOrFail. Remove/inline duplicated
utilities and remove unused parameters.
2023-10-23 23:38:47 +00:00
Marco Pennekamp e52529a1d1 [AA] Regenerate script tests for added KDoc reference resolve tests 2023-10-23 23:08:01 +00:00
Marco Pennekamp f04b27b90b [AA] Add additional KDoc reference resolution tests for callables
- This adds KDoc reference resolution tests for callables in nested and
  inner classes, overloaded functions, and private callables.
- Private declarations are visible in KDoc from outside their containing
  classes. This is in line with K1 KDoc behavior.

^KTIJ-22324
2023-10-23 23:08:01 +00:00
Marco Pennekamp ef484c7518 [AA] Fix KDoc reference resolution of non-imported companion object members
- Similar to the fix for KTIJ-25995, the name interpretation collector
  needs to consider the companion object's member scope as well.

^KTIJ-25995
2023-10-23 23:08:01 +00:00
Marco Pennekamp 0add17d9da [AA] Fix KDoc reference resolution of companion object members
- The nested scope construction in `getSymbolsFromMemberScope` was
  missing the companion object member scope.

^KTIJ-25995 fixed
2023-10-23 23:08:01 +00:00
Marco Pennekamp 71792f9ad6 [AA] Add test for KDoc reference resolution of sibling nested class 2023-10-23 23:08:00 +00:00
Marco Pennekamp 367b84d45e [AA] Add tests for KDoc reference resolution of companion object members
^KTIJ-25995
2023-10-23 23:08:00 +00:00
Marco Pennekamp 3dbae89cdd [AA] Add tests for KDoc reference resolution of non-static callables
^KTIJ-26003
2023-10-23 23:08:00 +00:00
Marco Pennekamp 2acee69908 [AA] Fix KDoc reference resolution for non-static callables from supertypes
- We should use member scopes to find symbols from supertypes.
- The issue was already fixed for static callables because the declared
  member scope was composed with the static member scope. See
  KTIJ-25960.

^KTIJ-26003 fixed
2023-10-23 23:08:00 +00:00
Svyatoslav Kuzmich 2694326ef8 [Wasm] Add EXTERNAL_TYPE_EXTENDS_NON_EXTERNAL_TYPE K2 diagnostic
Prohibit extending non-external types with external types (same as K1)

Issue KT-56849
2023-10-23 17:31:04 +00:00
cristiangarcia cc2280a146 Make KonanCompileLibraryTask cacheable
Merge-request: KT-MR-11117
Merged-by: Cristian Garcia <Cristian.Garcia-Marin@jetbrains.com>
2023-10-23 16:55:14 +00:00
Brian Norman 29807af9cb [FIR] Extract symbol from candidates for function contract DFA
^KT-61055 Fixed
2023-10-23 16:29:47 +00:00
Evgenii Mazhukin 6ed7e83378 [IC][MPP] Upgrade tests for incremental scenarios with expect-actual
Existing tests were k1-only in CI. Simplified test project, added
assertions for native. Switched to the new test Dsl.

^KT-61845 duplicates KT-61590
^KT-56963 in progress

Merge-request: KT-MR-12651
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
2023-10-23 13:24:08 +00:00
Alexander.Likhachev 1556925358 [Gradle] Unify a bit logic of retrieving task loggers 2023-10-23 13:04:17 +00:00
Alexander.Likhachev b1ec2eb18a [Gradle] Unify a bit logic of compiler execution exceptions wrapping 2023-10-23 13:04:17 +00:00
Alexander.Likhachev 65f6f6a07f [Gradle] Extract task outputs backup restore conditions 2023-10-23 13:04:17 +00:00
Alexander.Likhachev 664b54de5f [Gradle, BT] Add IC integration tests for the build tools API mode
#KT-61865 Fixed
2023-10-23 13:04:17 +00:00
Alexander.Likhachev 3eaaed8e7f [BT] Add debug logging for compilation iterations 2023-10-23 13:04:17 +00:00
Alexander.Likhachev ad4f4cbd28 [BT] Clear jar caches after project compilation 2023-10-23 13:04:17 +00:00
Alexander.Likhachev 3adb202eb6 [Gradle, BT] Add support for outputs backup within build tools API compilation
#KT-61896 Fixed
2023-10-23 13:04:17 +00:00
Alexander.Likhachev b460c06907 [BT] Add support for in-process incremental compilation
#KT-61865 Fixed
2023-10-23 13:04:17 +00:00
Johan Bay fb1d2278a0 [klibs] header klibs should keep private interfaces
^KT-62213 Fixed
2023-10-23 11:48:05 +00:00
Vladimir Sukharev e43b634122 [K/N] Migrate most simple filecheck tests to new infra
^KT-62157


Merge-request: KT-MR-12376
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-10-23 10:07:28 +00:00
Ilya Goncharov 3d399a8b25 [JS] Remove npm publication of JS packages
^KTI-1380 fixed
2023-10-23 09:42:03 +00:00
Artem Kobzar 73b1272211 [K/JS] Add .mjs extension to main file in package.json for ES modules compilation 2023-10-23 08:04:45 +00:00
Anastasia.Nekrasova 9acae3b0df [K2] Disappeared ITERATOR_MISSING
^KT-59986
2023-10-23 07:56:02 +00:00
Vladimir Sukharev f98451e381 rrn/sukharev/kt59433-add-text-for-NESTED_CLASS_ACCESSED_VIA_INSTANCE_REFERENCE
Follow-up to https://jetbrains.team/p/kt/reviews/12502/timeline which was incomplete for https://youtrack.jetbrains.com/issue/KT-59433/K2-Missing-NESTEDCLASSACCESSEDVIAINSTANCEREFERENCE
- Fix test DefaultMessagesTest by adding a text for new diagnostic.
- Move diagnostic's definition into better place

Merge-request: KT-MR-12680
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-10-20 18:04:21 +00:00
Ivan Kylchik ad0fad5fad [FIR] Drop isStatic field from FirJavaFieldBuilder
It is not used anywhere, and it looks like the proper way to set
`isStatic` is through the `status` field.
2023-10-20 16:33:21 +00:00
Ivan Kylchik 69a888b431 [FIR] Add diag test to verify const checker in Java world
Currently, this test is not working for FIR.

#KT-57802 Fixed
2023-10-20 16:33:21 +00:00
Ivan Kylchik 4334ae9da9 [FIR] Add JvmName to the list of REQUIRED_ANNOTATIONS
We need to resolve `JvmName` as soon as possible because
it can be analyzed in `FirJavaElementFinder` to create
the correct class stub.

#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik a45bb8d92b [FIR] Find the correct FIR file in Java finder for file with JvmName
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik 8c7c44f9f5 [FIR] Fix evaluation of Java properties for Char and String types
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik bf6f241d4a [FIR] Reuse transformConst method to evaluate properties in Java world
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik 4d9b4dd27f [FIR] Use lazy evaluation for FIR Java properties
This is needed to avoid recursive evaluations when we have
multiple `const val` properties in a single class or file.

#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik 7935b2bdb1 [FIR] Allow to evaluate top level const properties in Java world
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik 886ef1a4b4 [FIR] Support the simple case of java field interpretation
#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik 2af73c2b13 [FIR] Add FirJavaElementFinder to session's components
This change allows us to use `IrInterpreter` to evaluate Kotlin's
const properties that were called from Java world

#KT-57802
2023-10-20 16:33:20 +00:00
Ivan Kylchik fbe00b1b91 [FIR] Add Fir2IrLazyField class
This class will be used to delay const evaluation of java fields
until IR tree is built.

#KT-57802
2023-10-20 16:33:20 +00:00
Ilya Gorbunov bd6607c860 Drop kotlin-stdlib-wasm project
Its tasks are no longer used as build entry points
2023-10-20 16:27:30 +00:00