Commit Graph

101708 Commits

Author SHA1 Message Date
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
Timofey Solonin 4cb90aed52 [MPP] Remove obsolete target from CommonizerIT test for KT-47641
^KT-47641
^KT-58822
2023-06-07 18:45:01 +00:00
Nikolay Lunyak 5daec16ce0 [FIR] Forbid creating abstract class instances via any qualified access
^KT-58938 Fixed
2023-06-07 16:45:28 +00:00
aleksandrina-streltsova fccb391f31 [AA] Renderer: enable rendering name without symbol
^KTIJ-22404
2023-06-07 16:22:28 +00:00
Timofey.Solonin 928c590599 [MPP] Remove obsolete targets from KotlinTargetHierarchyDslTest
and add missing assertions for the targets that are not checked

^KT-58822
2023-06-07 15:20:05 +00:00
Brian Norman 63a327808c [Test] Update FIR diagnostic rendering 2023-06-07 15:19:42 +00:00
Timofey Solonin f27ca23000 [MPP][Gradle] Replace obsolete linuxArm32Hfp target with mingwX64 in MppCInteropDependencyTransformationIT.KT50952
^KT-50952
^KT-58822
2023-06-07 15:19:14 +00:00
Pavel Kunyavskiy 15e5adf2b5 Mark reflection related tests as jvm-only 2023-06-07 14:59:38 +00:00
Denis.Zharkov 69a6339935 K2: Add test for obsolete KT-51793
^KT-51793 Fixed
2023-06-07 14:49:22 +00:00
Dmitriy Novozhilov c745ef09d1 [FIR] Move check for INSTANCE_ACCESS_BEFORE_SUPER_CALL from resolution stage to checker
^KT-48870
2023-06-07 14:33:33 +00:00
Yahor Berdnikau 4a501a257e [Gradle] Restore Kapt import compatibility with older Kotlin plugin releases
Still supported IDEA/Kotlin plugin releases relies on
'kotlin-annotation-processing-gradle' artifact name in compiler plugins
classpath. I've restored this publication usage until we will stop
support Kotlin plugin versions that doesn't know about
'kotlin-annotation-processing-embeddable' name.

^KTIJ-25586 Fixed
2023-06-07 13:21:57 +00:00
Nikolay Lunyak 97adb01600 [FIR Native] Don't add Cloneable supertype when it's not present
^KT-58549 Fixed
2023-06-07 13:03:02 +00:00
Sebastian Sellmair a80d6a7b74 [Gradle] Ide Dependency Resolution: Filter 'loop' or 'self' dependencies
Those are dependencies that point back to the original project.
This can happen with two projects like

```
// project a
kotlin {
    commonMain.get().dependencies {
        api(project(":b"))
    }
}

// project b
kotlin {
    commonTest.get().dependencies {
        implementation(project(":a"))
    }
}
```

Where b(test) -> a -> b

^KT-59020 Verification Pending
2023-06-07 12:38:54 +00:00
Alexander.Likhachev 19073b96a7 [Build] Add a property to disable usernames obfuscation for build scans
The property is `kotlin.build.scan.obfuscate.username`
2023-06-07 12:33:10 +00:00
Alexander.Likhachev ebef67ea6a [Build] Enable internal Gradle setup plugin by default
Related to KTI-1223
2023-06-07 12:33:10 +00:00
Alexander.Likhachev 04fcffa664 [Build, IGS] Add a consent details document link
Related to KTI-1223
2023-06-07 12:33:10 +00:00