Commit Graph

101723 Commits

Author SHA1 Message Date
Pavel Mikhailovskii fc7af2c9e0 KT-58720 Generate full InnerClass attributes for the standard library; deprecate -Xuse-old-innerclasses-logic 2023-06-09 11:31:17 +00:00
Bogdan Mukvich 1dbe47c039 [CODEOWNERS] Add IntelliJ Kotlin Plugin to OWNER_LIST 2023-06-09 11:56:36 +02:00
Yahor Berdnikau 6aff392434 [Gradle] Fix moduleName is not possible to set in native via compilation
^KT-57823 Fixed
2023-06-09 08:24:14 +00:00
Kirill Rakhman 86836e69e9 [FIR2IR] Unwrap call-site substitution overrides
Generating IR declarations for use-site substitution overrides leads
to IR that is different from K1 as well as problems in signature
generation which relies on mangling. Use-site substitutions can contain
references to type parameters from the call-site which aren't handled
in mangling.

#KT-57022 Fixed
2023-06-09 08:22:21 +00:00
Kirill Rakhman bcdd85758e [FIR] Split origin SubstitutionOverride into declaration and call-site 2023-06-09 08:22:21 +00:00
Kirill Rakhman 67fc46a190 [FIR] Fix handling of type parameters in FIR mangling
#KT-57429 Fixed
2023-06-09 08:22:21 +00:00
Anton Lakotka 938dd65881 [Gradle] test lazy resolved configuration can handle circular dependencies
In gradle it is possible to add dependency to configuration which
is resolved to itself. It is possible due to nature of Configuration
that can contain both: dependencies and artifacts. When configuration
has dependency on itself, it practically means that this dependency
will be resolved to configuration's artifacts.

LazyResolvedConfiguration should be capable to handle such dependencies
2023-06-08 22:10:24 +00:00
Anton Lakotka 2b26b0c540 [Gradle] Add integration test for Icerock Mobile Multiplatform plugin
^KT-59049
2023-06-08 22:10:24 +00:00
Anton Lakotka e5d35f7d1a [Gradle] deprecate android and introduce androidTarget preset
Android preset needs to be removed in favor of Android Pluggable Target

Changes were originally introduced by commit:
becf50ee0f
but then, unfortunately, reverted due to binary compatibility issues

^KT-59049 Verification Pending
^KT-57903 Verification Pending
2023-06-08 22:10:24 +00:00
Anton Lakotka 5a8b6e9603 Revert "[Gradle/MPP] Refactored KotlinTargetContainerWithPresetFunctions"
This reverts commit becf50ee

These changes are binary incompatible due to move of methods with
default arguments.

^KT-59049 In Progress
^KT-57903 In Progress
2023-06-08 22:10:24 +00:00
Leonid Startsev 0cfe2b04f5 Move KmModuleFragment to an internal.common package
because it is klib-related and can be read only with KotlinCommonMetadata.
2023-06-08 17:53:31 +00:00
Leonid Startsev c3d363d1b8 Throw exception instead of returning null from KotlinClass(Module)Metadata.read() 2023-06-08 17:53:31 +00:00
Leonid Startsev 1c629e748f Add JvmStatic + JvmOverloads to writing functions in KotlinClassMetadata
and KotlinModuleMetadata for easier use from Java.
2023-06-08 17:53:31 +00:00
Leonid Startsev 70739df0ad Improve toString() for KmAnnotationArgument 2023-06-08 17:53:31 +00:00
Brian Norman 92cb47a8f9 [FIR] Always report when named arguments are not allowed
#KT-59177 Fixed
2023-06-08 17:25:34 +00:00
Denis.Zharkov 61ed34f4b7 K2: Adjust JDK 21 test data to the latest JvmMappedScope changes
See 2e5b783cc6 for details

After the fix for KT-57694 (mostly rewritten JvmMappedScope),
the behavior of loading new JDK 21 members of K2 has been aligned with K1
2023-06-08 15:53:22 +00:00
Denis.Zharkov d5f24addea K2: Fix isHiddenForThisCallSite for non-direct overridden
Previously, the call of `z.sort` in test has been resolved
to the overridden member
2023-06-08 15:53:22 +00:00
Alexander Udalov b992e698e4 Minor, add regression test for KT-58772
#KT-58772
2023-06-08 15:42:27 +00:00
Alexander Udalov ccf4a6813c Minor, move kt57353 test to a subfolder 2023-06-08 15:42:27 +00:00
Alexander.Likhachev 14460db8e5 [Gradle] Provide relevant error message on daemon crash
#KT-59191 Fixed
Related to KT-55385
2023-06-08 15:34:34 +00:00
Aleksei.Cherepanov 274ac76959 [Build] Fix CCE from gradle publication task 2023-06-08 15:04:43 +00:00
Dmitriy Novozhilov 48c7af171a Advance bootstrap to 1.9.20-dev-3234 2023-06-08 15:04:42 +00:00
Ilya Goncharov 96a4821df6 [Gradle, JS] Rename NPM aggregated configuration
^KT-59116 fixed
2023-06-08 14:40:13 +00:00
Vladimir Sukharev 7aea0af307 [K/N] Enable passed tests for K1/N in involvesInterpreter
^KT-59057

Merge-request: KT-MR-10524
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-08 14:13:54 +00:00
Ilya Kirillov b8f15cbbb3 [LL FIR, Java] fix resolve contract violation from java symbol provider
To create a smart psi type pointer, IJ Platform uses resolve.
We cannot use resolve from JavaSymbolProvider, as it may lead to resolve contract violation.

^KT-59133 fixed
2023-06-08 14:13:30 +00:00
Justin Paupore f590e88bdd [Analysis API] Add source shadowing for resolve extensions.
KtResolveExtensions are designed to handle IDE analysis use cases where
source might not be available at analysis time, because that source is
generated by an external source generator, such as an annotation
processor or resource compiler. The sources generated by those external
generators can appear in the analysis scope, and cause issues with
source clash - resolution may find the virtual source from the
KtResolveExtension, the on-disk generated source from the external
generator, or both. This can cause issues, because that on-disk
generated source may be stale, and may not have symbols that will exist
the next time the generator is run (or, conversely, may have symbols
that will disappear on the next build).

To solve this, add a `getShadowedScope(): GlobalSearchScope` to
`KtResolveExtension`. Any files in the module that are included in that
scope will be hidden from resolution, allowing the resolve extension to
cleanly replace those files.

^KT-58834 fixed
2023-06-08 15:55:04 +02:00
Ilya Kirillov 7c87eb098d [FIR] refactoring, use data class instead of a Pair in FirTypeResolver.resolveType 2023-06-08 13:41:35 +00:00
Ilya Kirillov 672cc85949 [LL FIR] remove LowLevelFirApiFacadeForResolveOnAir.onAirResolveTypeInPlace
which is unused now

^KT-58125
2023-06-08 13:41:35 +00:00
Ilya Kirillov 481962d5f6 [LL FIR] get rid of on-air resolve of partial type qualifiers
It's very slow and leads to performance problems (see KT-58125)

Instead, we do the following:

- For a fully resolved type qualifier, when we want to resolve its part,
 we are looking for the corresponding symbol by traversing nested classes
 bottom up.
 - For an error qualifier, we are trying to resolve the maximum possible
  qualifier in the types transformer where all the type scopes are
  already available.

^KT-58125 fixed
2023-06-08 13:41:35 +00:00
Ilya Kirillov 51cf0ce3e5 [FIR] refactoring, extract type resolving to a separate function in FirSpecificTypeResolverTransformer
^KT-58125
2023-06-08 13:41:34 +00:00
Ilya Kirillov 2cd4ff11f0 [FIR] introduce FirErrorTypeRef.partiallyResolvedTypeRef
^KT-58125
2023-06-08 13:41:34 +00:00
Ilya Kirillov da35f436b3 [FIR] refactoring, extract KtUserType -> FirUserTypeRef to a separate function in RawFirBuilder
^KT-58125
2023-06-08 13:41:34 +00:00
Mikhail Glukhikh 0373e3fdfe KtFe10SymbolInfoProvider: take annotation use-site target into account 2023-06-08 13:34:50 +00:00
Ilya Goncharov b783a87c25 [Gradle, JS] Use workaround to not link provider with task
^KTIJ-25757 fixed
2023-06-08 13:30:16 +00:00
Ilya Goncharov 4c9b94330d [Gradle, Wasm] Use invariant path separator for wasm karma
^KT-58931 fixed
2023-06-08 13:18:06 +00:00
Brian Norman b595328192 [Parcelize] Ignore all sealed classes in Parcelize FIR generator
Sealed classes are inherently abstract and should not have Parcelable
functions added via the FIR declaration generator.

#KT-59112 Fixed
2023-06-08 12:58:32 +00:00
Abduqodiri Qurbonzoda 830c78773c Align behavoir of collection constructors across platforms #KT-59192
The initialCapacity should be non-negative and loadFactor should be positive.

As a part of efforts to stabilize Native stdlib.
2023-06-08 12:41:40 +00:00
Abduqodiri Qurbonzoda 0bef1533e2 Improve documentation of collection constructors #KT-59192 2023-06-08 12:41:40 +00:00
Yahor Berdnikau 2f7ae074f0 [Maven] Fix configured remote repositories that are not participating in compiler plugin artifacts resolve
^KT-58978 Fixed


Co-authored-by: Yahor Berdnikau <egorr.berd@gmail.com>

Merge-request: KT-MR-10519
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-06-08 12:26:59 +00:00
Ivan Kylchik f74fd947b3 [JVM_IR] Don't add synthetic accessor when processing function reference
The issue appeared after code refactoring. Originally we didn't
save generated accessor for symbols in `IrFunctionReference`. These
symbols will be processed in their own turn.

#KT-59079 Fixed
2023-06-08 11:13:50 +00:00
Pavel Kunyavskiy 456783436c [K/N] Fix cast to NativePtr mis-compilation
^KT-59022
2023-06-08 10:40:29 +00:00
Nataliya.Valtman af05f4c201 KT-58662 Fix build reports for Gradle 8.1 with Configuration Cache 2023-06-08 10:07:35 +00:00
Egor Kulikov f2f979134d [FIR] Change diagnostic INITIALIZER_TYPE_MISMATCH to work with for loop
^KTIJ-25251 fixed


Merge-request: KT-MR-10507
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-06-08 09:40:09 +00:00
Denis.Zharkov 7087ba3ca9 FIR2IR: Minor. Move withContainingFirClass to convertClassContent
As it's anyway is being called each time
2023-06-08 08:04:03 +00:00
Denis.Zharkov c474c54903 FIR2IR: Fix IAE for case of local override of a method with defaults
It was happening because for MyClass.foo we didn't set overriddenSymbols
properly because in ClassMemberGenerator.convertFunctionContent we
used incorrect containingFirClass that was pointing to anonymous class
instead of MyClass.

^KT-58902 Fixed
2023-06-08 08:04:03 +00:00
Alexander Korepanov b04848d179 [JS IR] Drop pirLowerings lowering list 2023-06-08 07:31:43 +00:00
Anna Kozlova 983d319a6b [AA] fe10 symbols adjusted to be used in goto type declaration
- try to find sources for decompiled symbols in IDE mode
- function literals can't be declared as extensions,
though there target can contain that indication,
let's take what descriptor provides
2023-06-07 21:46:49 +00:00
Anna Kozlova 86bed92a46 [AA] ensure psi files from stdlib do not leak 2023-06-07 21:00:26 +00:00
Anna Kozlova 4d97e4c572 [LL] add tests for FirDeclarationForCompiledElementSearcher
build stub if was not able to load:
expected that in IDE stubs would always be found in the index, for tests -
build from virtual file
2023-06-07 21:00:26 +00:00
Timofey Solonin bc306844af [MPP] Replace obsolete linuxArm32Hfp with mingwX64 in CommonizerIT test for KT-48138
^KT-48138
^KT-58822
2023-06-07 19:27:02 +00:00