Commit Graph

106805 Commits

Author SHA1 Message Date
Yan Zhulanow 1fb8fb2324 [Pill] Do not import modules with the 'FULL' variant
The 'FULL' variant proved to be hardly useful for everyday work.
This change is the first step of removing the variant support from Pill.
2023-12-07 08:53:35 +00:00
Yan Zhulanow 63379b2c03 [Pill] Only add the 'jvmJar' artifact for the main source set 2023-12-07 08:53:34 +00:00
Yan Zhulanow 4e8a5eec7f [Pill] Support KMP 'jvmJar' task convention 2023-12-07 08:53:34 +00:00
Yan Zhulanow a508a650a5 [Pill] Include embedded dependencies together with the module itself 2023-12-07 08:53:34 +00:00
Yan Zhulanow a703fc0f17 [Pill] Remove obsolete IDE plugin artifact creation 2023-12-07 08:53:34 +00:00
Yan Zhulanow 680db7c317 [Pill] Allow kotlin_dom_api_compat artifact 2023-12-07 08:53:34 +00:00
Anton Lakotka 73b290a948 [Gradle] suppress DependencySources configurations in tests
PreHmppDependenciesDeprecationIT test checks that all configurations are
resolved without any error. However, *DependencySources configurations
by nature can't be resolved all the time. As not all dependencies have
sources variants published.
2023-12-07 08:42:35 +00:00
Anton Lakotka daa97f7ec9 [Gradle] Fix testResolveAllConfigurations
It should exclude certain kotlin source set configurations, that
can't be resolved all the time for various reasons.

Particularly `dependencySources` since not all dependencies has
published source variants.
2023-12-07 08:42:35 +00:00
Anton Lakotka c979e4e7be [Gradle] Add dependencySourcesConfigurationName to DefaultKotlinSourceSet
Move logic that creates configuration to resolve Dependency Sources
to SourceSet factory from IDE resolver. Because when it is created
during IDE import it will be reported as a warning. Since all
configurations and tasks must be created before IDE import starts.

^KT-63226 Verification Pending
2023-12-07 08:42:35 +00:00
Anton Lakotka 1d4bca56b1 [Gradle] Set min version for source resolver test to Gradle 7.2
Earlier versions of gradle doesn't return capabilities in resolved
artifact view. Therefore, it is not possible to match artifact by
cooridnates + capabilities.

^KT-63226
2023-12-07 08:42:35 +00:00
Anton Lakotka e2dafa2580 [Gradle] Implement variant base source resolver for IDE
^KT-63226 In Progress
2023-12-07 08:42:35 +00:00
Anton Lakotka 7c9505d9b6 [Gradle] Sources resolver test for multiple capabilities
If dependency has more than one capability sources still can be
resolved.

^KT-63226 In Progress
2023-12-07 08:42:35 +00:00
Roman Golyshev f266a44356 KT-64080 [LL] Resolve super calls to BODY_RESOLVE for on-air resolve
^KT-64080 Fixed
2023-12-07 01:26:23 +01:00
Roman Golyshev 3c7dfc0e5b KT-64080 [LL] Use nullable receiver overload for isAncestor function
This simplifies the `bodyResolveRequired` a lot
2023-12-07 00:41:55 +01:00
Roman Golyshev a475a3031e KT-64080 [LL] Add on-air resolve tests for enum entry resolution 2023-12-07 00:41:53 +01:00
Timofey Solonin a03f0ef4ee Generate CMakeLists for convenient DevX in llvmDebugInfoC
^KT-63598
2023-12-06 18:56:28 +00:00
Nikita Bobko 0d67ae7b23 [TEST] Add regression test for KT-59805 ACTUAL_MISSING for constructor 2023-12-06 18:35:39 +00:00
Tomas Husak 5ccae2801d [FIR] KT-59368 regenerate tests 2023-12-06 17:34:05 +00:00
Tomas Husak d7eb67a436 [FIR] KT-59368 context receiver subtyping checker 2023-12-06 17:34:05 +00:00
Ivan Kochurkin 3d77d09260 [FIR] Fix false positive errors on Throws::class, Throws()
^KT-63794 Fixed
2023-12-06 16:39:51 +00:00
Ivan Kochurkin 8dcd4efbc1 [FIR] Get rid of not needed set allocation in getSingleVisibleClassifier 2023-12-06 16:39:51 +00:00
Troels Bjerre Lund 4f77434ea5 [K/N] Remove LLVM coverage
The -Xcoverage feature has not worked and has been disabled for a while.
This fix removes it, and all of its uses.


Co-authored-by: Troels Lund <troels@google.com>


Merge-request: KOTLIN-MR-821
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-12-06 14:07:16 +00:00
Dmitrii Gridin e0c931f69d [LL FIR] rebind returnTarget for delegate accessors during psi2fir
It is safe to rebind returnTarget to the original declaration during
psi2fir as it doesn't affect the resolution. We already have the same
logic for regular functions/property accessors.
This change is crucial in the context of parallel implicit type
resolution because it affects CFG builder in a bad way in the case
of on-air resolution

^KT-56551
2023-12-06 12:59:55 +00:00
Dmitrii Gridin c59ea8bd2a [FIR] use delegate expression as source for FirWrappedDelegateExpressionBuilder
The previous implementation was not stable because `extractDelegateExpression`
has a source depending on extractDelegateExpression, and it led to
inconsistency in lazy and regular mode in the case of labeled expression
```kotlin
val a: String by l@ MyProperty()
```
In lazy mode the source is KtLabeledExpression, but in the regular one
is KtCallExpression

^KT-56551
2023-12-06 12:59:55 +00:00
Ivan Kylchik 1fcd277538 [FIR] Expand divisionByZero.kt test case
Added two new cases:
1. division where denominator is `val` property
with zero initializer;
2. division where denominator is `const val` property
with zero initializer.

Both such cases have different sets of diagnostics compared to K1.

#KT-59894 Fixed
2023-12-06 10:54:21 +00:00
Ivan Kylchik 5dbe81fd7f [FIR] Always expand a type before checking it in FirConstChecks
The issue appeared when we analyzed some typealias.
1. The typealias itself could be valid, but it could point
to an invalid type.
2. The typealias could point, for example, to an unsigned
type that must be handled in a special way

#KT-59894
2023-12-06 10:54:21 +00:00
Yahor Berdnikau ab1ce759a3 [Gradle] Fix deprecated buildDir usage in IdeBinaryDependencyResolver
^KT-62527 In Progress
2023-12-06 10:09:22 +00:00
Yahor Berdnikau 6df25ac1be [Gradle] Fix deprecated buildDir usage in IdeResolveDependenciesTask
^KT-62527 In Progress
2023-12-06 10:09:22 +00:00
Ilmir Usmanov 32e43998a0 IR: Restore method used by Anvil annotation processor
But make it hidden, so, the new method will be used instead
 #KT-62281
2023-12-06 09:52:07 +00:00
Kirill Rakhman 2391f00b75 [FIR2IR] Fix SAM conversion of adapted callable reference
#KT-63329 Fixed
2023-12-06 09:02:04 +00:00
Timofey Solonin c8b77fe18c Run lldb tests only on arm64 macOS and only in debug mode
^KT-63598
2023-12-06 08:39:06 +00:00
Marco Pennekamp 1901ed36ec [LL] Expand "Low Level FIR API Tests" run configuration to include tests from submodules
- LL API tests should include LL API JDK 11 tests and, if applicable, LL
  API native tests.
2023-12-05 21:31:32 +00:00
Marco Pennekamp ee7c67ba11 [LL] Add LL API module for JDK 11 tests to support Lincheck tests
- Lincheck is compiled with JDK 11 and the `low-level-api-fir` module is
  based on the JDK 8 toolchain, so we need to add a new module with a
  JDK 11 toolchain to support Lincheck tests. We cannot bump
  `low-level-api-fir` to JDK 11 because `low-level-api-fir-for-ide`
  requires it to be based on a JDK 8 toolchain.
- Using a Gradle test suite is unfortunately not an option, because
  `low-level-api-fir-for-ide` will think that the whole
  `low-level-api-fir` module is compiled with JDK 11 if just a single
  test suite has this toolchain.

^KT-62136
2023-12-05 21:31:32 +00:00
Sergej Jaskiewicz c0c6667876 [FIR generator] Make Readme.md up-to-date 2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz 8d1907e2f5 [FIR/IR generator] Introduce the common entry point for tree generators
This reduces code duplication.
2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz 858343695c [FIR generator] Remove unused constant 2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz 19ff050eae [FIR/IR generator] Move usedTypes to AbstractElement, rename it 2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz e4078d163b [IR generator] Move each visitor printer into its own file 2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz 8c75526130 [FIR generator] Move each visitor printer into its own file 2023-12-05 20:30:22 +00:00
Sergej Jaskiewicz 0c0f7f9899 [FIR/IR generator] Rename files with printers: use printer class's names 2023-12-05 20:30:22 +00:00
Mikhail Glukhikh 06ce57ea56 K2: report MISSING_DEPENDENCY_CLASS for lambda parameters if needed
#KT-62525 Fixed
2023-12-05 18:16:52 +00:00
Mikhail Glukhikh c03830556f [tests] Don't run Android codegen tests with IGNORE_BACKEND: ANY 2023-12-05 18:15:53 +00:00
Mikhail Glukhikh 4b649cbbe9 [tests] Drop a BI codegen test for should-be-red issue KT-63648 2023-12-05 18:15:53 +00:00
Mikhail Glukhikh 254bcdc80a [tests] Change builder inference tests in accordance with KT-53749 changes 2023-12-05 18:15:53 +00:00
Stanislav Ruban 7515efc52c [tests] Change builder inference tests in accordance with new K2 BI diagnostics
Related to KT-59369, KT-59390
2023-12-05 18:15:53 +00:00
Stanislav Ruban da0c3090a9 [tests] Regenerate test configurations 2023-12-05 18:15:53 +00:00
Stanislav Ruban c0bf67af22 [tests] Add test data for KT-63841 2023-12-05 18:15:52 +00:00
Stanislav Ruban 4f38d77fae [tests] Add test data for KT-63840 2023-12-05 18:15:52 +00:00
Stanislav Ruban 2bcaa3eb8f [tests] Add test data for KT-63733 2023-12-05 18:15:52 +00:00
Stanislav Ruban a836e94619 [tests] Add test data for KT-63648 2023-12-05 18:15:52 +00:00