Commit Graph

102371 Commits

Author SHA1 Message Date
aleksandrina-streltsova 39bdd67df6 [AA] Shortener: change test data
Remove ON_AIR_CONTEXT_CARET_TAG where it's not necessary
2023-07-04 16:34:53 +00:00
aleksandrina-streltsova d89aafb06c [AA] Resolve package fqName in KDoc 2023-07-04 16:34:52 +00:00
aleksandrina-streltsova 9766270afa [AA] Shorten kdocs that became available because of newly added imports 2023-07-04 16:34:52 +00:00
aleksandrina-streltsova 88f2bf85eb [AA] Test shortener for the whole file with different options 2023-07-04 16:34:51 +00:00
aleksandrina-streltsova 67c3849538 [Analysis API] Shortener: enable shortening in KDoc
^KTIJ-21103
2023-07-04 16:34:51 +00:00
Kirill Rakhman e7c213e06e [FIR] Report separate error for delegated constructor call to interface
#KT-59216 Fixed
2023-07-04 16:00:45 +00:00
Kirill Rakhman 5abab2197b [FIR] Adapt positioning of NO_VALUE_FOR_PARAMETER to match K1 2023-07-04 16:00:45 +00:00
Kirill Rakhman 6d1d6e48c1 [FIR] Rename qualifiedAccessOrAssignmentsOrAnnotationCalls to callsOrAssignments and add delegated constructor calls 2023-07-04 16:00:45 +00:00
Sergej Jaskiewicz 6281faa063 [IR] Move IrFactory#createBlockBody overloads to extension methods
This is to prepare for IrFactory auto-generation (KT-59308).
2023-07-04 15:19:28 +00:00
Sebastian Sellmair c7795c7863 [Wasm] Implement WasmDependencyResolutionSmokeTest 2023-07-04 14:16:26 +00:00
Igor Yakovlev c6fdf1b3dd [Wasm] Add kotlin wasm gradle attribute 2023-07-04 14:16:26 +00:00
Mads Ager 607d38f96f [K2 plugin] Support simple arguments in annotation metadata extension.
^KT-58968
^KT-60051 Fixed
2023-07-04 14:11:26 +00:00
Aleksei.Glushko 96b44e0ad8 [K/N] concurrent weak sweep ^KT-57772 2023-07-04 13:42:59 +00:00
Dmitrii Gridin 09ca335b7e [FIR] CFG: drop redundant edges
Edges from class to its functions and nested classes are redundant
and lead to extra resolution work in lazy resolve mode

^KT-59600 Fixed
2023-07-04 12:07:04 +00:00
Yan Zhulanow df28bd1d79 [Stubs] Pass proper container source to stub-based FIR declarations
Backend, which is used by the expression evaluator, relies on the class
name in 'FacadeClassSource'. To pass the correct JVM class name,
stubs for top-level functions and properties got the 'origin'.
2023-07-04 11:17:39 +00:00
Yan Zhulanow 8bf8b7b35b [LL API] Minor, prettify deserialized callable loading 2023-07-04 11:17:39 +00:00
Dmitrii Gridin 050c66ea81 [FIR] add missing Any super type to Cloneable
^KTIJ-24272 Fixed
2023-07-04 10:20:37 +00:00
Svyatoslav Scherbina 85919c4d62 Bump Kotlin/Native version in KGP to 1.9.20-dev-5069
Also, adjust NativeIrLinkerIssuesIT after 5f3dad1. See the explanation
below.

5f3dad1 makes -Xlazy-ir-for-caches disabled by default. So the compiler
now deserializes different subsets of IR and in different orders.
As a result, the error message for a test changes. Both error messages
(before and after this commit) are correct, and the selection depends
on the IR deserialization strategy.
Moreover, this commit changes the expected error message to the initial
version, used before -Xlazy-ir-for-caches was introduced.
2023-07-04 10:16:32 +00:00
Dmitrii Gridin 43705d9a75 [FIR] drop redundant replace from wrapped expression
They were introduced for lazy

^KT-59687
2023-07-04 10:09:51 +00:00
Dmitrii Gridin a81523fa74 [LL FIR] mark entire delegate as lazy expression
To simplify modification and restoring

^KT-59687
2023-07-04 10:09:51 +00:00
Dmitrii Gridin f8b2b4ac21 [FIR] FirVariable: add replace method for delegate
It is required to properly implement lazy expression calculation

^KT-59687
2023-07-04 10:09:51 +00:00
Igor Chevdar 4f859a634e [K/N] Fixed a bug in escape analysis
#KT-59693 Fixed
2023-07-04 09:45:48 +00:00
Ilya Goncharov 0bbf16dff4 [Wasm] Add kotlin-stdlib-wasm and kotlin-test-wasm to trusted group 2023-07-04 08:52:30 +00:00
Artem Daugel-Dauge de56f788f6 [Gradle] Warn about kotlinArtifacts DSL usage
^KT-58029 Verification Pending
2023-07-04 08:29:39 +00:00
Yahor Berdnikau 4c95797067 [Gradle] disable toolchain auto-download in tests
Required JDKs should be already downloaded by Kotlin repo itself.
2023-07-04 07:38:12 +00:00
Yahor Berdnikau 5b1ffb417a [Gradle] Update AGP versions for tests 2023-07-04 07:38:12 +00:00
Yahor Berdnikau f4fbc2edc6 [Gradle] Update Gradle versions for tests
Added Gradle 8.2 release
2023-07-04 07:38:12 +00:00
Denis.Zharkov 78e2d53f3c K2: Adjust Analysis API to the recent scope structure changes
Namely, in the previous commit we merged two
(LOW and HIGH priority default start import scopes) into the single one

For more explanations, please look at the previous commit
2023-07-04 07:25:22 +00:00
Denis.Zharkov 01354c8ce5 K2: Fix false-positive resolution to j.l.String constructor
In K1 (see LazyImportScope), default start import with different
priority worked as follows:
- if something is found in HIGH, don't look at LOW
- otherwise, look at LOW

That, in particular, helped to avoid looking into JDK mirroring classes'
constructors like when resolving calls like String(...) because we
just don't look into j.l.String while already found kotlin.String

The change inside FirTowerResolveTask.kt is not made accidentally:
- At first, it's more or less obviously a bug fix because tower group
for hide-members candidate with implicit receiver should take into
account the tower level of the receiver itself.
- The change is attached to this commit because otherwise the test
at compiler/testData/diagnostics/testsWithStdLib/kt55503.kt starts
failing.
The bug was hidden because previously after finding a successful
`Sequence.forEach` candidate for the inner receiver
(at the default HIGH star import scope), resolver was continuing to
look into default LOW star import scope where it's frozen forever because
we had the better/closer candidate anyway.

But after this change with merging default star imports into the same
tower leve, resolver was continuing its job, enumerating implicit
receivers, finding List<Int> there and noticing that there's
a TopPrioritized hide-member candidates for them
(erroneously ignoring it has a worse/more far receiver).

^KT-51670 Fixed
2023-07-04 07:25:22 +00:00
Denis.Zharkov 12dcfd25e6 K2: Fix test state for KT-51670 before the fix 2023-07-04 07:25:22 +00:00
Roman Golyshev c5ded1ba48 KTIJ-26103 [Analysis API] Ignore implicit dispatch receivers in Reference Shortener
Calls to extension functions imported from objects have implicit
dispatch receivers, but those receivers are not present in the code
and should not be analyzed by the shortener

^KTIJ-26103 Fixed
2023-07-03 20:05:09 +00:00
Sebastian Sellmair 8d2ac41454 [Gradle] Only register CInteropMetadataDependencyTransformationTask's for shared native source sets
KT-58712
2023-07-03 18:42:14 +00:00
Timofey Solonin 4695d9088a [MPP] Enable cinterop commonization if CocoaPods plugin is applied
^KT-58712
2023-07-03 18:42:14 +00:00
Artem Daugel-Dauge caaade1f4f [Gradle] Fix invalidation framework after sync while preserving 'generateDummyFramework' task semantic
^KT-49430 Verification Pending
2023-07-03 17:37:37 +00:00
Anna Kozlova f96b5bae48 [LL] anchor module provider for navigation in monorepo
Use information from IDE about anchor module,
to include everything from that module and dependencies into library session
^ KTIJ-24683
2023-07-03 17:10:51 +00:00
Egor Kulikov 19fb6e7458 [FIR] Don't resolve parameters in function types in invalid code
^KTIJ-25653 fixed

Merge-request: KT-MR-10831
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-07-03 16:30:14 +00:00
Roman Golyshev ab149e1053 KTIJ-26024 [Analysis API] Add more tests for nested cases of reference shortening in class header
Account for `FirNestedClassifierScopeWithSubstitution` in the reference
shortener
2023-07-03 16:21:42 +00:00
Roman Golyshev 4adda42206 KTIJ-26024 [FIR] Expose original scope from FirNestedClassifierScopeWithSubstitution
Access to the original scope is required for the
KtFirReferenceShortener to correctly compare the scopes between each
other
2023-07-03 16:21:42 +00:00
Roman Golyshev 88450c69b3 KTIJ-26024 [Analysis API] Provide correct context for class header from FirTowerDataContextAllElementsCollector
To correctly provide the context for class header resolution, we save
the additional copy of the context right before `withRegularClass`
wrapper call in `LLFirBodyLazyResolver`. Otherwise we would have to
clear the existing context by hand, which is too cumbersome
(if at all possible)

^KTIJ-26024 Fixed
^KTIJ-24832 Fixed
2023-07-03 16:21:42 +00:00
Roman Golyshev d7d2c1f260 KTIJ-26024 [Analysis API] Refactor FirTowerDataContextAllElementsCollector 2023-07-03 16:21:42 +00:00
Roman Golyshev 96697b5a77 KTIJ-26024 [Analysis API] Rearrange testData for reference shortener
Move testData for nested classes' scopes to a separate directory
2023-07-03 16:21:42 +00:00
Alexander Shabalin e1b168d77c [K/N] Fix performance build 2023-07-03 15:49:42 +00:00
Alexander Shabalin 4081115774 [K/N] Fix benchmarksAnalyzer build 2023-07-03 15:49:42 +00:00
Anton Lakotka 182c10f77d [Gradle] Mark some tasks with @DisableCachingByDefault
By default, tasks should opt-in for supporting build cache through
marking class with @CacheableTask.

However, some tasks should not be cacheable by default, as for these
tasks doesn't do any heavy load. Even worse, storing and extracting
tasks results from the remote cache (for example) would take more time
than actual run on host machine.

So these tasks are marked as @DisableCachingByDefault

^KT-59307 Verification Pending
2023-07-03 15:46:34 +00:00
Timofey Solonin e59371d291 [MPP] Add a test for configuration avoidance between CommonizeCInterop
and CInterop tasks

^KT-58712
2023-07-03 15:41:31 +00:00
Timofey Solonin a1db10c5fe [MPP] Use SetProperty in CInteropCommonizerTask for configuration avoidance
^KT-58712
2023-07-03 15:41:30 +00:00
aleksandrina-streltsova 57cbab7d8e [AA] Shortener: allow import if requested import kind has high priority 2023-07-03 15:08:05 +00:00
aleksandrina-streltsova a96e2f37e7 [Analysis API] Shortener: don't add import if it affects usages
^KTIJ-24096 Fixed
2023-07-03 15:08:04 +00:00
aleksandrina-streltsova 338c2433ac [Analysis API] Add API for expect/actual declaration detection 2023-07-03 15:08:04 +00:00
aleksandrina-streltsova da5f33d762 [Analysis API] Do not shorten qualifiers outside the selection range
^KTIJ-25116 Fixed
2023-07-03 15:08:04 +00:00