Commit Graph

104067 Commits

Author SHA1 Message Date
Aleksei.Cherepanov 073df585c4 Fix testdata after #5162
After changes in `kotlin-maven-plugin: Don't print warning on no resources to compile` and `Update KotlinCompileMojoBase.java` commits test data was updated

#KT-26156 Fixed
2023-08-29 11:11:04 +00:00
Oddbjørn Kvalsund 31e96eb7de Update KotlinCompileMojoBase.java
kotlin-maven-plugin: Simplify log message when there are no sources to compile

This new message is now identical to the Java compiler plugins message for the same scenario.

(cherry picked from commit 0fc5086d1118669a48e57ed70174c630bafbf9c4)
2023-08-29 11:11:04 +00:00
Oddbjørn Kvalsund cfdaa30c69 kotlin-maven-plugin: Don't print warning on no resources to compile
(cherry picked from commit 364b89099d6528ee01955ce32fd42bf8d5e7f8cc)
2023-08-29 11:11:04 +00:00
Aleksei.Glushko 3efd98df1a [K/N] More work to do for weak-sweeper in weak ref benchmarks
Merge-request: KT-MR-11899
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-08-29 10:52:33 +00:00
Kirill Rakhman a42cb2f37f [FIR] Allow treating candidates from the same non-source module as equivalent
This situation occurs in Native metadata compilation and lead to
false-positive OVERLOAD_RESOLUTION_AMBIGUITY reports.

#KT-61461 Fixed
2023-08-29 09:29:52 +00:00
Egor Kulikov fd5ac8575c [FIR] Do not expect FirExpression when KtLoopExpression is supplied
^KTIJ-26599 fixed

Merge-request: KT-MR-11708
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-08-29 09:26:52 +00:00
Timofey Solonin f20cc10660 [MPP] Add intel macOS support and create simulators for the test run
^KT-61439
2023-08-29 09:18:44 +00:00
Artem Kobzar 9d00dfd76e [K/JS] Unmute custom binaries tests for JS because of fixed KT-54905 2023-08-29 09:17:17 +00:00
Egor Kulikov d7f2f22b4b [FIR] Fix errors related to expect classes/delegated constructors
^KT-60384 fixed

Merge-request: KT-MR-11835
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2023-08-29 08:39:36 +00:00
Dmitrii Krasnov dbddac3e80 Added existsCompat and its usages for checking tasks' inputs.
#KT-54232 Ready for Review

Merge-request: KT-MR-11705
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-29 07:51:14 +00:00
Iaroslav Postovalov 9c8b215bbb [JVM IR] Don't track fake override methods in JvmSignatureClashDetector
trackFakeOverrideMethod in JvmSignatureClashDetector is modified to
ignore fake overrides to prevent duplicate tracking of such methods,
improving efficiency
2023-08-29 04:22:59 +00:00
Sebastian Sellmair ac6c42da7b [Gradle] KMP: Disable support of 'idea.gradle.download.sources' property
... as support within IntelliJ currently is poor for .knm files
and IntelliJ instructs Gradle sync to not download sources by default
for now.

^KT-61520 Verification Pending
2023-08-28 17:55:15 +02:00
Roman Golyshev c8ae22eb66 KTIJ-26785 [AA] Filter JavaClassMembersEnhancementScope when shortening types
The same way as `FirClassUseSiteMemberScope` is present
when there is an implicit receiver with a pure Kotlin type,
`JavaClassMembersEnhancementScope` is present when
the receiver's type comes from Java sources

^KTIJ-26785 Fixed
2023-08-28 15:21:40 +00:00
Dmitrii Gridin 5aae053785 [AA FIR] add symbol restoring for $$result declaration
^KT-61431 Fixed
^KT-61451
2023-08-28 15:02:25 +00:00
Dmitrii Gridin 99510ca42b [AA] add test for $$result declaration
^KT-61431
2023-08-28 15:02:25 +00:00
Dmitrii Gridin adc853ebd0 [AA] extend SymbolData API to support scripts
^KT-61431
2023-08-28 15:02:24 +00:00
Dmitrii Gridin b6f34ad8c0 [AA] add API to get KtScriptSymbol for KtScript
^KT-61431
2023-08-28 15:02:24 +00:00
Dmitrii Gridin 700835ef13 [AA] generate tests for scripts
^KT-61431
2023-08-28 15:02:24 +00:00
Dmitrii Gridin 5557ea690d [AA] add generated tests for scripts
^KT-61431
2023-08-28 15:02:24 +00:00
Dmitrii Gridin 932c2a6e15 [AA FIR] KtFirReferenceShortener: process only statements in scripts
We shouldn't process other elements (like parameters/receivers) because
we can't modify them anyway. This will help to avoid exceptions like
```
Attempt to load text for binary file which doesn't have a decompiler plugged in
```
in tests

^KT-61431
2023-08-28 15:02:24 +00:00
Dmitrii Gridin bef5f89f61 [AA] add configurator for scripts
^KT-61431
2023-08-28 15:02:24 +00:00
Dmitrii Gridin 0a5501b8dd [LL FIR] add ability to pass analyseInDependentSession into AnalysisApiFirScriptTestConfigurator
^KT-61431
2023-08-28 15:02:24 +00:00
Brian Norman 833072e1fb [FIR] Add checker for MISSING_DEPENDENCY_CLASS
#KT-59371 Fixed
2023-08-28 15:00:04 +00:00
Pavel Punegov ecb6b5dc58 [K/N][build] Remove obsolete kotlin-native-shared project
This project was replaced by the :native:kotlin-native-utils located at
native/utils. All sources were already merged.


Merge-request: KT-MR-11847
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-08-28 14:57:16 +00:00
Alexander.Likhachev 57294f91fe [Gradle] Get rid of StartParameterInternal.isConfigurationCache calls
#KT-61457 Fixed
2023-08-28 14:21:55 +00:00
Alexander.Likhachev 51fe1fd3cc [Gradle] Introduce ConfigurationCacheStartParameterAccessor
#KT-61457 In Progress
2023-08-28 14:21:55 +00:00
Mikhail Glukhikh 6ce096f0ed K2: handle extra value parameter in FirCallCompleter properly
#KT-60450 Fixed
2023-08-28 14:02:56 +00:00
Dmitrii Gridin 0068a3f6b8 [Analysis API FIR] mapAnnotationParameters: add debug information
^KT-61252
2023-08-28 12:59:58 +00:00
Dmitrii Gridin 7a24d0ee82 [Analysis API] KtPsiTypeProvider: disable for non-jvm platforms
Otherwise, it will throw exception like:
```
IllegalStateException: No 'FirJvmTypeMapper'
```

Anyway, PsiType is JVM conception, so it is not supposed to be used
outside the JVM platform

^KT-60318
2023-08-28 12:45:29 +00:00
Dmitrii Gridin 7fa7d8ea8d [SLC] provide light classes only for platforms with jvm target
Light classes are not supposed to work on non-jvm platforms due to its
specific

^KT-60318 Fixed
2023-08-28 12:45:29 +00:00
Nikolay Lunyak 13a7bb95b3 [FIR] Relax MULTIPLE_DEFAULTS_* to account for the K1 behavior
^KT-56442
^KT-36188
2023-08-28 10:57:40 +00:00
Nikolay Lunyak 3f1bf6112f [FIR] Report MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES
Reporting it for `VIRTUAL_MEMBER_HIDDEN`
is ok, because `VIRTUAL_MEMBER_HIDDEN`
has always been an error, so we are
allowed to treat these as overrides
implicitly.

^KT-59408 Fixed
^KT-59419 Fixed
^KT-57076 Fixed
2023-08-28 10:57:40 +00:00
Dmitriy Novozhilov 0dd36ad456 [FIR2IR] Rename entrypoint function of Fir2IrConverter
Originally it was named createModuleFragmentWithSignaturesIfNeeded, because
  there was a counterpart `...WithoutSignatures`. Now that function has
  gone and there is only one entrypoint left
2023-08-28 10:22:04 +00:00
Dmitriy Novozhilov cb0d61309a [FIR2IR] Move initialization of Fir2IrComponentsStorage into its constructor 2023-08-28 10:22:04 +00:00
Mikhail Glukhikh 3e330241b4 K1/K2: add a test to fix state of KT-55168 2023-08-28 09:40:26 +00:00
Ivan Kochurkin d9b5d37baf [K2, MPP] Forbid matching actual callable with dynamic return type
to expect callable with non-dynamic return type

^KT-59251 Fixed
2023-08-28 09:29:05 +00:00
Alexander Shabalin 452e67f0e6 [K/N] Make kotlin-native:backend.native:tests:sanity same as run. 2023-08-28 09:27:58 +00:00
Kirill Rakhman c30ce4aabe [FIR] Print operator keyword and token to unresolved diagnostic message
#KT-55672 Fixed
2023-08-28 08:12:25 +00:00
Kirill Rakhman 85bb7faf10 [FIR] Report WRONG_NUMBER_OF_TYPE_ARGUMENTS on typealias in super types
#KT-59893 Fixed
2023-08-28 08:02:31 +00:00
Kirill Rakhman bb8a46c3a0 [Test] Parallelize test generation 2023-08-28 08:02:05 +00:00
Aleksei.Glushko 0d04e170b1 [K/N] Prevent unmarked objects from appearing during concurrent weak processing
Merge-request: KT-MR-11614
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com>
2023-08-26 16:00:12 +00:00
Dmitriy Novozhilov 3013e3549c [FIR2IR] Merge declareParameters and bindAndDeclareParameters functions 2023-08-25 21:06:15 +00:00
Dmitriy Novozhilov d4f55894b4 [FIR2IR] Properly calculate dispatch receiver type for fake overrides
If some function is not fake-override, then its type should be just
  default type of containing class
For fake overrides the default type calculated in the following way:
1. Find first overridden function, which is not fake override
2. Take its containing class
3. Find supertype of current containing class with type constructor of
   class from step 2

^KT-60252 Fixed
2023-08-25 21:06:15 +00:00
Dmitriy Novozhilov e28f97cf6d [FIR2IR] Extract setting of declaration parent from bindAndDeclareParameters function
Setting parent has nothing in common with declaring parameters
2023-08-25 21:06:15 +00:00
Alex Kuznetsov 35b3a9ec82 [Docs] Samples for 'step' function 2023-08-25 19:34:39 +00:00
Timofey Solonin 53645bce2b [MPP] Specify missing target for arm macOS
^KT-61439
2023-08-25 18:21:27 +00:00
Ilya Goncharov 355ad3e641 [Gradle, JS] Distinguish creating prepared resolution and writing package.json
^KT-61326 fixed
2023-08-25 17:23:10 +00:00
Bogdan Mukvich 2472999242 Fail generateTests when testData directory is empty
When switching git branches, there might be some empty directories left
This causes generateTests to pass locally with no changes and fail on CI
2023-08-25 15:23:40 +00:00
Dmitriy Novozhilov 2ee0d6a4c1 [FIR2IR] Get rid of all usages of IrSymbol.owner from FirIrProvider
^KT-60924
2023-08-25 14:23:42 +00:00
Dmitriy Novozhilov 0cbce42185 [FIR2IR] Refactor Fir2IrVisitor.visitThisReceiverExpression
Extract processing of different kinds of bound symbol into separate
  functions to improve readability
2023-08-25 14:23:42 +00:00