Commit Graph

97898 Commits

Author SHA1 Message Date
Nikolay Krasko 7fa45e8af9 Add information to verification metadata about libraries used during publication to sonatype 2023-01-19 15:07:28 +00:00
Ilya Goncharov d7c31f79a8 Do not suppress NPM related tasks, but be aware about checking of them in task graph 2023-01-19 13:43:57 +00:00
Nikita Bobko 887547c445 Drop MetadataComparisonTest & drop build-tools -> util-klib dependency
Review: https://jetbrains.team/p/kt/reviews/8360

MetadataComparisonTest was the only one in build-tools module who
depended on util-klib, that's why we can drop build-tools -> util-klib
dependency

MetadataComparisonTest is no longer needed, that's why we can drop it.

The dependency drop is a one step forward in dropping
`kotlin.srcDir("../compiler/util-klib/src")` line in
`buildSrc/build.gradle.kts`. Adding source roots in `buildSrc` is hacky
and can lead to frustrations (e.g. KT-55874). That's why it's desirable
to drop buildSrc -> util-klib hacky dependency.

Unfortunatelly, I couldn't drop buildSrc -> util-klib dependency,
because:
1. buildSrc depends on kotlin-native/shared/src/library/kotlin +
   buildSrc depends on kotlin-native/tools/kotlin-native-gradle-plugin +
   maybe smth else
2. kotlin-native/shared/src/library/kotlin depends on util-klib +
   kotlin-native/tools/kotlin-native-gradle-plugin depends on util-klib +
   maybe smth else
2023-01-19 12:55:56 +00:00
Anna Kozlova 07525fef51 [AA] extract source psi from delegated wrapper when exists 2023-01-19 11:38:32 +00:00
hungvietnguyen f172c50f27 New IC: Ignore LookupSymbols that refer to file facades (#5069)
A LookupSymbol should only refer to either a class, a class member, or a
package member.

When a LookupSymbol refers to a file facade (e.g.,
LookupSymbol(name="FooKt", scope="com.example")), it is redundant as it
doesn't impact the IC analysis to find files to recompile.

Previously, the new IC (ClasspathChangesComputer) would fail when
detecting that IncrementalJvmCache reported these redundant
LookupSymbols. With this change, the new IC will just ignore them.

Note: A better approach would be to fix IncrementalJvmCache to not
report these LookupSymbols, but it will require some significant
cleanup/refactoring work, so we can consider it later.

Test: New KotlinOnlyClasspathChangesComputerTest.testRenameFileFacade
^KT-55021 Fixed
2023-01-19 12:21:29 +01:00
Leonid Startsev dc0cd61b6f Handle @Serializable classes that implement interfaces by delegation
by filtering out delegated properties that end up in irClass.properties() list

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/2157
2023-01-19 11:12:31 +00:00
Denis.Zharkov 490970e65e Adjust KotlinJavaPsiFacade::knownClassNamesInPackage for empty scope
The method must return an empty set in that case, instead of null
that would mean we can't compute it.

The problem was found when running FirLoadCompiledKotlinGenerated
2023-01-19 10:57:44 +00:00
Denis.Zharkov 9c988fd8d8 K2: Introduce FirCachingCompositeSymbolProvider
The main idea is pre-computing the sets of names that might be
met there, that helps to decrease the sizes of the backing maps
(by avoiding irrelevant keys)

Totally, this branch with previous commits speeds up MT Full Kotlin
approximately on 3 seconds (~5%)
2023-01-19 10:57:43 +00:00
Denis.Zharkov 6705d211a6 K2: Get rid of FirDependenciesSymbolProviderImpl
Its usages will be safely replaced
with FirCachingCompositeSymbolProvider

But here, in the commit plain FirCompositeSymbolProvider used temporary
2023-01-19 10:57:43 +00:00
Denis.Zharkov 9302fe3cb5 K2: Get rid of redundant FirDependenciesSymbolProvider class 2023-01-19 10:57:42 +00:00
Denis.Zharkov dab50daf56 K2: Add ability identify DI components by string key instead of KClass
It allows having several the same typed-component in the container
2023-01-19 10:57:42 +00:00
Denis.Zharkov 58c1b5dd1f K2: Optimize AbstractFirDeserializedSymbolProvider
Avoid filling caches with keys that are definitely empty
(if it's cheap to compute that), to decrease the size of backing maps.

The strategy is pre-computing the sets of names that might be met.
NB: the size of the sets is way fewer than a size of all queried names.
2023-01-19 10:57:42 +00:00
Dmitrii Gridin e2e87bd107 [FIR] CustomAnnotationTypeAttribute: drop redundant type specification
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:05 +00:00
Dmitrii Gridin a49b72b05e [AA] update testData
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:05 +00:00
Dmitrii Gridin 0420be603f [FIR] ScopeClassDeclaration: introduce new property to avoid container clash
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:04 +00:00
Dmitrii Gridin 6635ec33d9 [AA] KtTypeInfoProvider: update kdoc
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:04 +00:00
Dmitrii Gridin 7f24a38997 [FIR] FirTypeResolveTransformer: support lazy type annotations for all declarations
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:04 +00:00
Dmitrii Gridin 73cdaf5c3c [FIR] CustomAnnotationTypeAttribute: support type aliases
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Dmitrii Gridin 0e2967e520 [FIR] FirTypeResolveTransformer: avoid super call
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Dmitrii Gridin 09a77d261d [AA] KtTypeInfoProvider: introduce fullyExpandedType extension
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:03 +00:00
Dmitrii Gridin 8ce4c4eba9 [FIR] CustomAnnotationTypeAttribute: store fir symbol instead of declaration
^KTIJ-23547
^KTIJ-24141
2023-01-19 10:53:02 +00:00
Dmitrii Gridin 9d42a5cb01 [FIR] provide containerDeclaration to CustomAnnotationTypeAttribute for lazy resolve
tested by FirIdeNormalAnalysisSourceModuleSymbolByPsiTestGenerated.testTypeAnnotations

^KTIJ-23547 Fixed
^KTIJ-24141 Fixed
2023-01-19 10:53:02 +00:00
Dmitrii Gridin f32483000a [AA FIR] KtFirAnnotationListForDeclaration: avoid resolve on creation 2023-01-19 10:53:02 +00:00
Ilya Goncharov 843805d771 [Gradle, JS] Update detecting of platform and architecture
[Gradle, JS] Make hash codes compatible with previous kotlin

^KT-38015 fixed
^KT-48631 fixed
^KT-43305 fixed
2023-01-19 10:23:09 +00:00
Denis.Zharkov b1bb7dd25f K1: Fix regression with callable references as last statements in lambda
^KT-55729 Fixed
2023-01-19 10:00:02 +00:00
Denis.Zharkov a37e3def14 Add test for KT-55931 2023-01-19 10:00:02 +00:00
Ilmir Usmanov d18672bfb1 Wrap continuation with ContinuationImpl on callable references
in startCoroutineUninterceptedOrReturn. Otherwise, the coroutine will
not be interceptable later.

Add a test, which checks, that intercepted continuation is released.

 #KT-55869
2023-01-19 00:35:36 +00:00
Alexander Shabalin 9a2cb2609f [K/N] Extract LlvmLink out of CompileToBitcode ^KT-53776
Merge-request: KT-MR-8120
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-01-18 21:41:17 +00:00
Sergey Bogolepov 8e37a07af2 [K/N] Show warning when compiling for a deprecated target 2023-01-18 16:17:13 +00:00
Sergey Bogolepov 955479752e [K/N] Mention deprecation in -list-targets flag 2023-01-18 16:17:13 +00:00
Igor Chevdar bd24fc4f0c [IR] Don't wrap KotlinExceptionWithAttachments
#KT-56015 Fixed
2023-01-18 15:47:48 +00:00
Sergey.Shanshin d063db3ce0 Fixed missing fallback serializer in contextual serializer
Fixes Kotlin/kotlinx.serialization#2158

Merge-request: KT-MR-8338
Merged-by: Sergey Shanshin <Sergey.Shanshin@jetbrains.com>
2023-01-18 15:47:26 +00:00
Alexander.Likhachev da24e5559b [Gradle] Mention related tickets in BuildServiceDeclarationIT
#KT-55563
#KT-55740
2023-01-18 15:29:10 +00:00
Alexander.Likhachev 278229d2fa [Gradle] Inverse usesService declaration
KT-52149 Fixed
2023-01-18 15:29:10 +00:00
Alexander.Likhachev 36a6809d55 [Gradle] Declare build services usages for the Kotlin/JS plugin
#KT-52149 In Progress
2023-01-18 15:29:09 +00:00
Alexander.Likhachev 02bf10f21a [Gradle] Declare build services usages for the Kotlin/JVM plugin
#KT-52149 In Progress
#KT-55174 Fixed
#KT-55741 Fixed
2023-01-18 15:29:09 +00:00
Alexander.Likhachev d360feb847 [Gradle] Add tests for KT-52149, KT-55174, and KT-55741 2023-01-18 15:29:09 +00:00
Mikhail Glukhikh c8db20bd0b Compiler: restore an opportunity to switch light tree mode OFF
#KT-55996 Fixed
2023-01-18 14:01:22 +00:00
Dmitrii Gridin 5aef179a3d [LC] fix testData 2023-01-18 14:11:14 +01:00
Nikolay Krasko d81feabb69 Temporary trust both Kotlin 1.8.20 and 1.9.0 develop and bootstrap 2023-01-18 13:41:42 +01:00
Pavel Kunyavskiy 2843c0ad1e [K/N] Fix cleaning stack-local primitive array
^KT-55984
2023-01-18 11:52:43 +00:00
Sebastian Sellmair 9f850c1179 [Gradle] Fixup 'kotlinTestSingleDependencyMppJvmJs' to support new behaviour...
... of deprecated scoped DependenciesMetadata configurations.

^KT-55929 Verification Pending
2023-01-18 08:26:34 +00:00
Sebastian Sellmair 0ddefa1c02 [Gradle] Fixup 'kotlinTestSingleDependencyMppCommon' to support new behaviour...
... of deprecated scoped DependenciesMetadata configurations.

^KT-55929 Verification Pending
2023-01-18 08:26:34 +00:00
Sebastian Sellmair 10a1aab9bb [Gradle] Implement KT55929MetadataConfigurationsTest to leaking stdlib-common
^KT-55929 Verification Pending
2023-01-18 08:26:33 +00:00
Sebastian Sellmair d6a44c92b5 [Gradle] Implement KT55929MetadataConfigurationsTest to cover KT-55929
^KT-55929 Verification Pending
2023-01-18 08:26:33 +00:00
Sebastian Sellmair c0aa6cf873 [Gradle] Ensure deprecated *DependenciesMetadata configurations exclude common stdlib
^KT-55929 Verification Pending
2023-01-18 08:26:32 +00:00
Sebastian Sellmair cc684cce3d [Gradle] Ensure deprecated *DependenciesMetadata configurations carry necessary dependencies
^KT-55929 Verification Pending
2023-01-18 08:26:32 +00:00
Pavel Kunyavskiy fbc39fcab1 [K/N] Make a reproducer test for KT-55938
^KT-55938
2023-01-18 08:29:51 +01:00
Mads Ager e5417e8381 [K/N] Deal with external ObjC companion objects in cache builds.
^KT-55938 Fixed
2023-01-18 08:29:51 +01:00
Alexander.Likhachev 3dcf5af4b0 [IC] Add methods to write without explicit registering in a transaction
#KT-49785 In Progress
2023-01-17 22:15:57 +00:00