Commit Graph

104076 Commits

Author SHA1 Message Date
Alexander.Likhachev 3fb1f7bf42 [Gradle] Migrate from ChangesFiles to SourcesChanges
It allows getting rid of the dependency on `:compiler:incremental-compilation-impl`
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev 4eb468443a [Gradle] Remove old classpath snapshot transformation
Leave only the implementation via the build tools API in order to reduce compiler dependencies.
THe old implementation expects to have many of compiler modules (through `kotlin-compiler-embeddable`) in the plugin runtime classpath
#KT-61449 In Progress
2023-08-29 13:00:15 +00:00
Alexander.Likhachev a8269ff8e2 [Gradle] Opt in for the experimental build tools API module-wide
#KT-61449 In Progress
2023-08-29 13:00:14 +00:00
Alexander.Likhachev e68661fc0d [Build, Gradle] Remove totally unused KGP dependencies
#KT-61449 In Progress
2023-08-29 13:00:14 +00:00
Sebastian Sellmair 3c4163187d [Gradle] K2/KMP: Implement expect/actual discrimination by topologically ordering dependsOn klibs
^KT-61540 Verification Pending
2023-08-29 12:56:02 +00:00
Alexey Merkulov 10c6e2da87 [LL API] Fix code generation to access private property from evaluator
Lowering asks whether to generate getter/setter call only when it should
be present. It means the code define explicit getter or setter.
And it seems correct to use it instead of trying direct field access.
2023-08-29 12:34:58 +00:00
mvicsokolova 8f4136f145 [atomicfu] Added a check that atomic properties are declared as final values.
Fixes: https://github.com/Kotlin/kotlinx-atomicfu/issues/237

YT: KT-61550


Merge-request: KT-MR-11886
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-29 12:15:56 +00:00
Ilmir Usmanov e333716fbe JVM: Optimize isPrimitiveBoxing and isPrimitiveUnboxing
Precompute internal names and method descriptors instead of computing
on every access.
2023-08-29 12:15:31 +00:00
Alexander Udalov 3246b0a6bd JVM IR: inherit some lowerings from ClassLoweringPass
This slightly simplifies code, but has no other immediate benefits. In
the future though, we may end up optimizing all ClassLoweringPass
JVM IR phases by making them traverse only one list of all classes in
the module, instead of traversing the whole IR tree each time.
2023-08-29 11:32:41 +00:00
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