Commit Graph

9923 Commits

Author SHA1 Message Date
Alexander.Likhachev b1ec2eb18a [Gradle] Unify a bit logic of compiler execution exceptions wrapping 2023-10-23 13:04:17 +00:00
Alexander.Likhachev 65f6f6a07f [Gradle] Extract task outputs backup restore conditions 2023-10-23 13:04:17 +00:00
Alexander.Likhachev 664b54de5f [Gradle, BT] Add IC integration tests for the build tools API mode
#KT-61865 Fixed
2023-10-23 13:04:17 +00:00
Alexander.Likhachev 3eaaed8e7f [BT] Add debug logging for compilation iterations 2023-10-23 13:04:17 +00:00
Alexander.Likhachev 3adb202eb6 [Gradle, BT] Add support for outputs backup within build tools API compilation
#KT-61896 Fixed
2023-10-23 13:04:17 +00:00
Alexander.Likhachev b460c06907 [BT] Add support for in-process incremental compilation
#KT-61865 Fixed
2023-10-23 13:04:17 +00:00
Artem Kobzar 73b1272211 [K/JS] Add .mjs extension to main file in package.json for ES modules compilation 2023-10-23 08:04:45 +00:00
Alexander.Likhachev f630a27f14 [Build] Fix configuration cache issue in KGP IT
`project` cannot be used at execution time.
^KTI-1433 Fixed
2023-10-20 15:42:57 +00:00
Nikita Bobko 0f82baf841 [FE 1.0] 2/2 Drop AllowDifferentMembersInActual from compiler and testData
The annotation was dropped in the previous commit
2023-10-20 14:37:09 +00:00
Nikita Bobko 14029b0ebc [STDLIB] 1/2 Drop AllowDifferentMembersInActual from stdlib
^KT-62656 Fixed

I blindly converted all `@AllowDifferentMembersInActual` to suppresses.
But some suppresses in stdlib are redundant. I'm too lazy properly
annotate only the necessary places. All these suppresses will go away
after the bootstrap update anyway

I drop allowDifferentMembersInActual_class and
allowDifferentMembersInActual_typealias tests because their only purpose
was to check that `@AllowDifferentMembersInActual` works as expected

Note: some tests are failing in the compiler because of that. I will fix
them in the next commit
2023-10-20 14:37:09 +00:00
Igor Yakovlev 86fd889138 [K/Wasm] Bump nodejs version 2023-10-20 13:02:14 +00:00
Anton Lakotka 196f14823e [Gradle] Re-use existing nativeDistribution dir
Having a dedicated konan data dir is not working well on Windows
machine. Since invocation of kotlin compiler would make JVM
to load native-specific dlls and it would not be possible to clean them
up until they are unloaded.

^KT-61359 Verification Pending
2023-10-20 07:40:17 +00:00
Hung Nguyen fc408125c8 Fix MemoizedCallable in PropertiesBuildService
In commit 5ceebec, the MemoizedCallable instance was created inside the
Provider, which means that the MemoizedCallable is not reused the next
time the Provider is resolved. This was not the intended effect.

In this commit, we will create the MemoizedCallable instance up front so
that each time the Provider is resolved, it will reuse the same
MemoizedCallable and therefore avoid recomputing the value.

Test: Manually verified on the large project in KT-62496
^KT-62496 Fixed
2023-10-19 20:44:59 +00:00
Sebastian Sellmair f2a2c28ac9 [Gradle] Deprecate org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMultiplatformPlugin
... in favor of using Kotlin Gradle Plugin Extension Points

KT-61634
2023-10-19 15:54:35 +00:00
Sebastian Sellmair 7650264de3 [Gradle] Move KotlinMultiplatformPlugin.METADATA_TARGET_NAME to KotlinMetadataTarget
KT-61634
2023-10-19 15:54:35 +00:00
Sebastian Sellmair d5be59a8ec [Gradle] Implement ApplyJavaBasePluginSetupAction
KT-61634
2023-10-19 15:54:35 +00:00
Sebastian Sellmair c47db02d30 [Gradle] Move 'checkGradleCompatibility' to a single, very early invocation
This shall ensure that the compatibility with Gradle
- is always checked for all plugins we ship
- is checked as early as possible

KT-61634
2023-10-19 15:54:35 +00:00
Sebastian Sellmair a15c068471 [Gradle] Implement DeprecatedMppGradlePropertiesMigrationSetupAction
KT-61634
2023-10-19 15:54:35 +00:00
Sebastian Sellmair 3210fdfec4 [Gradle] Inline 'sourceSetFreeCompilerArgsPropertyName' to its use site
KT-61634
2023-10-19 15:54:35 +00:00
Sebastian Sellmair 90230dda60 [Gradle] Implement KotlinMultiplatformTargetPresetAction
KT-61634
2023-10-19 15:54:35 +00:00
Ilya Goncharov 5df8ac4d1a [Gradle, JS] Ignore stdout for mocha dry run
^KT-61992 fixed
2023-10-19 09:46:01 +00:00
Igor Chevdar 40e8552a8d [gradle] Added a bunch of Gradle IT on K/N incremental compilation 2023-10-19 07:57:36 +00:00
Ilya Gorbunov 3622ea2e33 [stdlib-gen] Minor refactoring: use enum entries instead of values 2023-10-19 03:11:54 +00:00
Ilya Gorbunov ff2254db69 [stdlib] Remove generator templates for js legacy 2023-10-19 03:11:53 +00:00
Ilya Gorbunov 1d232c69d6 [stdlib] Move location of generated sources for js-IR compilation 2023-10-19 03:11:53 +00:00
strangepleasures a33da2a1c6 Temporarily disable Kapt4IT and KaptIncrementalIT and the descendants.
Those tests are currently producing OOMs on Windows
2023-10-18 17:40:29 +00:00
Hung Nguyen 5ceebec331 Cache Gradle properties with a BuildService to improve performance
Currently, the performance overhead when loading a Gradle property
consists of:
  1. Creating a Provider
  2. Resolving the Provider

Both steps are performed even when the same property was loaded before.
That means this overhead will multiply when there are a large number of
property read requests (e.g., in KT-62496, the tested project 400,000
read requests for only 17 properties).

To improve performance, we will now cache both steps with a
BuildService.

With this commit, configuration time for the tested project returns to
the same level before commit d6becee where the performance regression
happened (that commit can't be reverted because it introduced
`Provider`s which are required for proper Gradle usage).

Test: Manually verified on the large project in KT-62496

^KT-62496 Fixed
2023-10-18 17:27:32 +00:00
Dmitriy Novozhilov 9366847e96 [FIR2IR] Properly approximate intersection types during fir2ir conversion
^KT-62544 Fixed
2023-10-18 13:02:11 +00:00
Sebastian Sellmair 6afe716238 [Gradle] Implement CustomizeKotlinDependenciesSetupAction
KT-61634
2023-10-18 12:22:09 +00:00
Sebastian Sellmair eba13b5b91 [Gradle] KotlinSingleTargetExtension: Implement lateinit target as Future
It is not obvious from 'KotlinSingleTargetExtension' that calling
into 'target' is unsafe and it might throw.

Ordering code (especially with Android) is hard:
It is not clear when the target will become available.

The Future (and forAllTargets implementation) is intended
to make working with targets generically more safe.

KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 77376f0d28 [Gradle] Implement KotlinMultiplatformSourceSetSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 382482a26c [Gradle] Implement MultiplatformBuildStatsReportSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 070b80a05f [Gradle] Implement KotlinMetadataTargetSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 0ccb98f579 [Gradle] Implement KotlinArtifactsExtensionSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair cc0a9e1cc1 [Gradle] Implement MultiplatformPublishingSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 822cb7f545 [Gradle] Implement UserDefinedAttributesSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair c22a7bf802 [Gradle] Implement LanguageSettingsSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 8ca1c06cf2 [Gradle] Implement SyncLanguageSettingsWithKotlinExtensionSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 58385ef64f [Gradle] Implement ScriptingGradleSubpluginSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 9ca22fa999 [Gradle] Implement GlobalProjectStructureMetadataStorageSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 2b823cba1e [Gradle] Implement IdeMultiplatformImportSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 246deafd6d [Gradle] Implement IdeResolveDependenciesTaskSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair 9d01ad7c3b [Gradle] Implement CInteropCommonizedCInteropApiElementsConfigurationsSetupAction
KT-61634
2023-10-18 12:22:08 +00:00
Sebastian Sellmair b9db036053 [Gradle] Implement AddBuildListenerForXCodeSetupAction
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 3be2eb9b31 [Gradle] Implement CreateFatFrameworksSetupAction
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair c7b4057dab [Gradle] Implement KotlinProjectSetupCoroutine
as util to easily launch configure action as suspending code

KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 628bd7a6be [Gradle] Implement KotlinMultiplatformAndroidGradlePluginCompatibilityChecker
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 234e5735e3 [Gradle] Implement KotlinToolingDiagnosticsSetupAction
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 1c568c2a10 [Gradle] Implement RegisterBuildKotlinToolingMetadataTask
KT-61634
2023-10-18 12:22:07 +00:00
Sebastian Sellmair 13492d3316 [Gradle] Implement AddNpmDependencyExtensionProjectSetupAction
KT-61634
2023-10-18 12:22:07 +00:00