Commit Graph

108117 Commits

Author SHA1 Message Date
Ilya Kirillov dd4b1abc6a Fix multiple allocations of empty PersistentMap in PersistentSetMultimap
The `persistentMapOf` overload without arguments should be used there.

The needed overload is not available in the version of `kotlinx.immmutable 0.3.2`,
so the library is updated to the latest version.

This commit also removes the dependency on the `kotlinx-collections-immutable-metadata`
as it's not published anymore for new versions of `kotlinx-collections-immutable`.

^KT-64987 fixed
2024-01-19 15:19:41 +00:00
Yahor Berdnikau 0e98eb5bb4 [Gradle] Add test checking '.attribute(key, attr)' method is not used
We want to prevent usages of 'AttributeContainer.attribute(key, attr)'
method in our codebase.

^KT-60664 Verification Pending
2024-01-19 14:58:23 +00:00
Yahor Berdnikau dbd77fc785 [Gradle] Fix eager task realization due to attributes querying
Gradle 8.3+ starts triggering JVM eager tasks creating via eagerly
configured attributes that we copy over from the Gradle JVM plugin for
Kotlin compilation. The fix is to migrate to '.attributeProvider()' API
to configure the attribute.

^KT-60664 In Progress
2024-01-19 14:58:23 +00:00
Alexander Shabalin 2da6946ac2 [K/N] Debug output for HostExecutor on windows ^KT-65113 2024-01-19 14:35:57 +00:00
Yahor Berdnikau facc9cdb58 [Gradle] Add compiler options DSL for Kotlin targets
Restore compiler options DSL for all Kotlin targets. 'KotlinTarget'
interface does not provide any common way to configuring options - this
is the responsibility of related plugin extensions.

From the hierarchical standpoint of view target DSL overrides options
configured in the extension.

^KT-57292 In Progress
2024-01-19 14:16:11 +00:00
Yahor Berdnikau e527781772 [Gradle] Introduce HasConfigurableCompilerOptions DSL interface
This interface should be attached to the KGP DSL entities that want to
provide an ability to configure Kotlin compiler options.

^KT-60733 In Progress
2024-01-19 14:16:11 +00:00
Nikolay Krasko 58fd558308 Remove flaky Kapt4ToolIntegrationTestGenerated test
The test is now very flaky and leads to java.lang.OutOfMemoryError

KTI-1559
2024-01-19 14:01:02 +00:00
Sergej Jaskiewicz bc5810ee67 [FIR2IR] Don't use descriptor manglers in FIR2IR
They don't do anything, only complicate the initial configuration.

KT-64990
2024-01-19 13:36:00 +00:00
Sergej Jaskiewicz 8b4cc050eb [FIR2IR] Remove linkViaSignatures from Fir2IrConfiguration
^KT-64809 Fixed
2024-01-19 13:36:00 +00:00
Sergej Jaskiewicz e8aa05928d [FIR2IR] Unconditionally disable linkViaSignatures on JVM
It was an experimental compilation mode that we don't need anymore.

KT-64809
2024-01-19 13:35:59 +00:00
Artem Kobzar 7568ee5a79 [K/JS] Add VOID optimization on object properties + align with the optimization the JS Plain Object plugin 2024-01-19 13:03:06 +00:00
Alexander Udalov b2c30921e4 JVM: support JVM-specific primitive/wrapper type overridability check
#KT-62045 Fixed
2024-01-19 12:30:48 +00:00
Alexander Udalov 39327a37cb IR: pass also unsubstituted member to external conditions
In the future version of JavaIncompatibilityRulesOverridabilityCondition
for IR, we need to compute the original JVM signature of a declaration.
In descriptors, it's possible simply by using `original`.
2024-01-19 12:30:48 +00:00
Ivan Kylchik e15894e98e [FIR] Properly check when expression in FirConstCheckVisitor
Added proper checks for `FirWhenSubjectExpression` and
`FirElseIfTrueCondition`
2024-01-19 11:40:39 +00:00
Ivan Kylchik 6c3aa6568e [FIR] Properly check constructor call in FirConstCheckVisitor 2024-01-19 11:40:39 +00:00
Ivan Kylchik 1423576d1a [FIR] Properly check FirIntegerLiteralOperatorCall in FirConstCheckVisitor 2024-01-19 11:40:39 +00:00
Ivan Kylchik c51d68e227 [FIR] Mark error expressions as valid consts in FirConstCheckVisitor 2024-01-19 11:40:39 +00:00
Ivan Kylchik 521306e5e9 [FIR] Move most property checks in corresponding fun in FirConstCheckVisitor
Basically moved property check code from
`visitQualifiedAccessExpression` into
`visitPropertyAccessExpression`
2024-01-19 11:40:39 +00:00
Ivan Kylchik 76268c941a [FIR] Properly check FirPropertyAccessExpression in FirConstCheckVisitor 2024-01-19 11:40:39 +00:00
Ivan Kylchik 10c687fa32 [FIR] Move most of the expression's checks into FirConstCheckVisitor
The only ones left are checking expression's symbol instead
of the expression itself.
2024-01-19 11:40:39 +00:00
Ivan Kylchik 2657cafa7b [FIR] Add session property to the FirConstCheckVisitor 2024-01-19 11:40:39 +00:00
Ivan Kylchik 7c9e5a1a4b [FIR] Move const check utils functions into FirConstCheckVisitor
This is the first step of moving all const check code into
a visitor class.
2024-01-19 11:40:39 +00:00
Ivan Kylchik 4e8adc6693 [FIR] Add new VALID_CONST entry to the ConstantArgumentKind 2024-01-19 11:40:38 +00:00
Ivan Kylchik c661f654ee [FIR] Drop useless check cast to FirCall in FirConstChecks 2024-01-19 11:40:38 +00:00
Adam Semenenko a6524be97a !fixup [Gradle] refactor Gradle task assertion utils for clarity
- Rename/update to differentiate between 'executed' tasks vs tasks
  that are not in the task graph
- de-duplicate assertTasksNotExecuted() / assertTasksAreNotInTaskGraph()
  they both did the same thing
- re-use code for verifying all tasks have a specific outcome
- add a more helpful failed assertion message if the task isn't found
- rename 'tasks' to 'taskPaths' for clarity
2024-01-19 11:21:27 +00:00
Adam Semenenko 1661957166 !fixup [Gradle] refactor Gradle task assertion utils for clarity
- Rename/update to differentiate between 'executed' tasks vs tasks
  that are not in the task graph
- de-duplicate assertTasksNotExecuted() / assertTasksAreNotInTaskGraph()
  they both did the same thing
- re-use code for verifying all tasks have a specific outcome
- add a more helpful failed assertion message if the task isn't found
- rename 'tasks' to 'taskPaths' for clarity
2024-01-19 11:21:27 +00:00
Adam Semenenko ad8341df9b [Gradle] refactor Gradle task assertion utils for clarity
- Rename/update to differentiate between 'executed' tasks vs tasks
  that are not in the task graph
- de-duplicate assertTasksNotExecuted() / assertTasksAreNotInTaskGraph()
  they both did the same thing
- re-use code for verifying all tasks have a specific outcome
- add a more helpful failed assertion message if the task isn't found
- rename 'tasks' to 'taskPaths' for clarity
2024-01-19 11:21:26 +00:00
Adam Semenenko 4b48f15d0f [Gradle] skip CheckKotlinGradlePluginConfigurationErrors if no errors
- Add an `onlyIf {}` check so CheckKotlinGradlePluginConfigurationErrors
  won't run unless there are errors,
which helps writing integration tests and preventing IJ warnings.
- remove unnecessary sequence when fetching DiagnosticsForProject
- update test assertions relating to
  CheckKotlinGradlePluginConfigurationErrors

^KT-61943 Fixed
2024-01-19 11:21:26 +00:00
Ilmir Usmanov 19283048a8 Replace bytecode text test with a stepping test
#KT-62965
2024-01-19 10:52:39 +00:00
Xin Wang 2e32e13466 JVM Codegen: Mark line number before calling of indy in SAM Conversion
Fixes: KT-62965
2024-01-19 10:52:39 +00:00
Pavel Kirpichenkov 6deb679e5c [LL] Fix incorrect KMP groups in case of reordered dependencies
KTIJ-27569
2024-01-19 10:20:52 +00:00
Pavel Kirpichenkov 98e3813af9 [LL] Add error recovery to KmpModuleSorter
KTIJ-27569
2024-01-19 10:20:52 +00:00
Pavel Kirpichenkov 24b19e3c32 [LL] Add test for KmpModuleSorter
KTIJ-27569
2024-01-19 10:20:52 +00:00
Pavel Kirpichenkov ce3c05500e [LL] Sort modules from the same KMP project in symbol providers
Sort dependency modules topologically if they belong to the same KMP
project, preserving their relative positions. Sorting all modules and
changing positions of unrelated modules can be harmful: in the case of
a classpath hell, IDE results can become different from runtime
behavior. Sorting in place can help to avoid this problem, because
conflicting declarations shouldn't be allowed in different source sets
of the same multiplatform project.

KTIJ-27569
2024-01-19 10:20:52 +00:00
Dmitriy Novozhilov 16b1caff7e [Doc] Update part of _Code authoring guideline_ about TODO processing 2024-01-19 09:59:14 +00:00
Yahor Berdnikau 6234b9960c [Gradle] Fix warnings in ExternalKotlinCompilationDescriptor
^KT-56904 In Progress
2024-01-18 22:45:58 +01:00
Yahor Berdnikau 3b837734d1 [Gradle] Fix warnings in MultiplatformLayoutV2MultiplatformLayoutV1StyleSourceDirUsageChecker
^KT-56904 In Progress
2024-01-18 21:12:28 +00:00
Yahor Berdnikau bc7c342003 [Gradle] Fix warnings in MultiplatformLayoutV2AndroidStyleSourceDirUsageChecker
^KT-56904 In Progress
2024-01-18 21:12:28 +00:00
Yahor Berdnikau 7de6fda9f2 [Gradle] Fix warnings in KotlinAndroidSourceSetLayoutChecker
^KT-56904 In Progress
2024-01-18 21:12:28 +00:00
Vladimir Sukharev 117ce133bf [K/N] Remove platform-dependent overridability check for properties
^KT-57640 Fixed
2024-01-18 18:43:08 +00:00
Alexander Shabalin 9613d0e8dc [K/N] Disable stress test with aggressive GC ^KT-63423 2024-01-18 17:53:04 +00:00
Alexander Shabalin 266208c500 [K/N] Fix finalizer handling with mimalloc ^KT-63423 2024-01-18 17:53:04 +00:00
Yan Zhulanow 50203adb72 [Analysis API] Minor, add KDoc for 'ContextCollector.Context' 2024-01-18 17:12:28 +00:00
Yan Zhulanow e393282c67 [Analysis API] Remove test infrastructure for obsolete on-air analysis 2024-01-18 17:12:28 +00:00
Yan Zhulanow 8c5c40760b [Analysis API] Minor, remove mentions of on-air analysis in KDoc 2024-01-18 17:12:28 +00:00
Yan Zhulanow 2c4fbb1eb1 [Analysis API] Minor, move out fallback computation for designation path 2024-01-18 17:12:28 +00:00
Yan Zhulanow 5d7f54500f [Analysis API] Remove 'FirTowerContextProvider'
The only implementation of 'FirTowerContextProvider' that is not
obsolete is inside the reference shortener.
2024-01-18 17:12:28 +00:00
Yan Zhulanow 9227359256 [Analysis API] Remove components of obsolete on-air analysis
On-air analysis only worked correctly inside declaration bodies, and
required special handling ('analyzeInDependedAnalysisSession()').
Dangling files, the on-air replacement, works seamlessly, and it is
available in all contexts.
2024-01-18 17:12:28 +00:00
Yan Zhulanow 9021fdaf83 [Analysis API] Remove obsolete dependentCopy tests 2024-01-18 17:12:28 +00:00
Yan Zhulanow 08727bf0be [Analysis API] Add more ContextCollector tests inspired by dependentCopy
As the on-air analysis is obsolete, related tests are going to be
deleted. Here we add cases not yet covered by 'ContextCollector' tests.
2024-01-18 17:12:28 +00:00