Commit Graph

105583 Commits

Author SHA1 Message Date
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
Ilya Gorbunov 892719171b Disable wasm-wasi stdlib tests execution unless kotlin.stdlib.wasi.tests property is specified
Reason: unstable on CI
KT-62694
2023-10-20 16:27:30 +00:00
Alexander.Likhachev f630a27f14 [Build] Fix configuration cache issue in KGP IT
`project` cannot be used at execution time.
^KTI-1433 Fixed
2023-10-20 15:42:57 +00:00
Nikita Bobko fa89b8b0f1 [FE 1.0] 2/2 Don't report a warning when new members are added to open expect actualization
^KT-62655 Fixed
2023-10-20 14:37:10 +00:00
Nikita Bobko 1d4ab50047 [FE 1.0] 1/2 Don't report a warning when new supertypes are added to open expect actualization
^KT-62655 Fixed
2023-10-20 14:37:10 +00:00
Nikita Bobko a537ab898e [FE 1.0] Refactoring: replace defensive NonPrivateCallableAdded with Unknown
Motivation: I'm going to drop NonPrivateCallableAdded (KT-62655) in the
next commits. But I don't want to change the existing logic when I drop
it. That's why I have to introduce the "Unknown" case
2023-10-20 14:37:10 +00:00
Nikita Bobko 12f932a63a [FE 1.0] Report a more precise diagnostic when parameter modifiers (vararg) are changed in actualization
^KT-62747 Fixed
2023-10-20 14:37:10 +00:00
Nikita Bobko 0f82baf841 [FE 1.0] 2/2 Drop AllowDifferentMembersInActual from compiler and testData
The annotation was dropped in the previous commit
2023-10-20 14:37:09 +00:00
Nikita Bobko 14029b0ebc [STDLIB] 1/2 Drop AllowDifferentMembersInActual from stdlib
^KT-62656 Fixed

I blindly converted all `@AllowDifferentMembersInActual` to suppresses.
But some suppresses in stdlib are redundant. I'm too lazy properly
annotate only the necessary places. All these suppresses will go away
after the bootstrap update anyway

I drop allowDifferentMembersInActual_class and
allowDifferentMembersInActual_typealias tests because their only purpose
was to check that `@AllowDifferentMembersInActual` works as expected

Note: some tests are failing in the compiler because of that. I will fix
them in the next commit
2023-10-20 14:37:09 +00:00
Dmitriy Novozhilov 8b03636b3b [Test] Unmute test due to KT-62058 2023-10-20 14:32:43 +00:00
Dmitriy Novozhilov 33e9ed37e4 Revert "[Build] Return the logic to force LV=1.9 for KGP and its dependencies"
This reverts commit 274198d8
Original commit is not needed anymore after bootstrapping on 9fd14456
2023-10-20 14:32:43 +00:00
Artem Kobzar 4a042dafef [K/JS] Fix nameBindings for ES-modules after the ES-modules external declarations optimization 2023-10-20 14:04:39 +00:00
Marco Pennekamp 72438f4969 [AA] Remove obsolete memberScopeByFqName test data
- The test data was already moved to `memberScope`, but some files were
  not deleted (see: 67ac985be7).
2023-10-20 13:28:12 +00:00
Roman Golyshev 0747fc36de KTIJ-27434 [AA] Unwrap safe call expression when resolving implicit invoke calls
`FirSafeCallExpression` does not implement `FirResolvable`, so we need
to unwrap it to correctly resolve calls like `foo?.bar()` when `bar` is
a lambda with receiver parameter or a functional type property

^KTIJ-27434 Fixed
2023-10-20 13:27:31 +00:00
Igor Yakovlev 86fd889138 [K/Wasm] Bump nodejs version 2023-10-20 13:02:14 +00:00
Mikhail Glukhikh cebb6747e3 K2: drop unnecessary attributes when inferring declaration types
Related to KT-62578
2023-10-20 12:38:19 +00:00
Mikhail Glukhikh 90eaf5f70f K2: introduce val ConeAttribute.keepInInferredDeclarationType 2023-10-20 12:38:19 +00:00
Sergej Jaskiewicz f2bb988e68 [FIR/IR generator] Replace getTypeWithArguments with a property
The `notNull` of that method was never used.
2023-10-20 10:49:20 +00:00
Sergej Jaskiewicz de4e39906c [FIR/IR generator] Use TypeRef for working with types in fields
- Don't inherit `AbstractField` from `Importable`, because it really
  is not
- Remove the `arguments` and `nullable` properties from `AbstractField`.
  Both properties can be derived from the field's `typeRef`.
- Make `AbstractField`'s `typeRef` property of type
  `TypeRefWithNullability` instead of just `TypeRef`, because fields
  can always be nullable.
2023-10-20 10:49:20 +00:00
Sergej Jaskiewicz f30bf0e7e2 [FIR generator] Remove unused customType property from SimpleField 2023-10-20 10:49:20 +00:00
Pavel Kirpichenkov 770332152b [LL] Don't register Java components for built-ins of non-JVM modules
This is the cause for the 'missing dependency supertype: Serializable'
issue: symbols from built-ins will have the additional Serializable
supertype provided by FirJvmDeserializationExtension that shouldn't
be used for non-JVM. In regular modules it is correctly not added by
the non-JVM sessions, leading to difference in supertypes and the error.

KTIJ-27449
2023-10-20 10:35:13 +00:00
Nikolay Krasko bd49df9878 Update intellij platform 213.7172.25 -> 213.7172.53 2023-10-20 10:10:47 +00:00
Pavel Kunyavskiy cf230525c5 [Code Owners] Update CODEOWNERS file with the new common backend team 2023-10-20 09:43:59 +00:00
Dmitrii Gridin 0b45c6ce23 [FIR] FirScriptConfiguratorExtensionImpl: provide source for script parameters
We need this source to be able to find the parent declaration

^KT-62693 Fixed
2023-10-20 09:27:21 +00:00
Dmitrii Gridin 17ab005668 [Analysis API FIR] KtSymbolContainingDeclarationProvider: support script declarations
This commit also fixes a missing symbol for KtScriptInitializer
and some symbol pointers
Many tests marked as 'DO_NOT_CHECK_NON_PSI_SYMBOL_RESTORE'
due to KtFirFileSymbol#createPointer logic – the pointer can
be created only for PSI

^KT-61451
^KT-61887
^KT-62626 Fixed
^KT-62693
2023-10-20 09:27:21 +00:00
Dmitrii Gridin d689c1a38f [FIR] FirJavaFacade: fix contract violation from annotations
`isJavaDeprecatedAnnotation` can't be used here because it triggers
the resolution of an annotation ClassId

^KT-62705 Fixed
2023-10-20 09:24:43 +00:00