Commit Graph

94113 Commits

Author SHA1 Message Date
Sergej Jaskiewicz 2ece4f4dbf [JS IR] Improve the precision of execution of stepping tests 2022-08-05 11:53:40 +00:00
Pavel Punegov e08efa8e3b [K/N][perf] Set mingw path on Windows
Benchmark analyzer depends on curl. And needs a path to mingw binaries.

Merge-request: KT-MR-6797
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-08-05 11:05:12 +00:00
Sergey.Shanshin 7a8c864c5c Added serialization support for unsigned arrays as built-in 2022-08-05 10:09:56 +00:00
Sergey.Shanshin c538189501 Added serialization support for the kotlin.Nothing class as built-in 2022-08-05 10:08:39 +00:00
Sergey.Shanshin c2bdd51658 Added diagnostic for external serializers
Relates Kotlin/kotlinx.serialization#532
2022-08-05 09:31:58 +00:00
Hung Nguyen 17bf6be807 Improve log messages when failing to compile with daemon
Instead of letting `compileWithDaemon` return null, allow it to throw
exceptions so that the caller can catch those exceptions and log clearer
messages on why it failed.

^KT-31602 In progress
2022-08-05 08:47:43 +00:00
Hung Nguyen 98349411fb Always compile non-incrementally if incremental state is missing
Test: Updated IncrementalCompilationClasspathSnapshotJvmMultiProjectIT.
        .testMissingIncrementalState

^KT-53231 Fixed
2022-08-05 07:45:24 +00:00
Hung Nguyen 9ca411a64c Add integration test for the case where incremental state is missing
^KT-53231 In progress
2022-08-05 07:45:23 +00:00
Hung Nguyen 49209804f2 Add ability to debug Kotlin daemon in integration tests
^KT-53231 In progress
2022-08-05 07:45:23 +00:00
Hung Nguyen 0c5eda1382 Revise incremental compilation failure handling tests
Revise BaseIncrementalCompilationMultiProjectIT's failure handling
tests to make it clear we have covered 2 important scenarios:
 - Failures caused by user errors: testFailureHandling_UserError
 - Failures caused by tool errors: testFailureHandling_ToolError

^KT-53231 In progress
2022-08-05 07:45:22 +00:00
Hung Nguyen e006a7af57 Shrink snapshots non-incrementally after fallback
If incremental compilation fails, we currently fall back to
non-incremental compilation. When that happens, it would be incorrect to
shrink classpath snapshot incrementally, so this commit makes sure we'll
shrink classpath snapshot non-incrementally in that case.

^KT-53231 In progress
2022-08-05 07:45:22 +00:00
Anton Lakotka 4310778137 [Gradle] Make AbstractKotlinNativeCompile::manifestFile to be Provider
KT-43293
2022-08-05 04:25:22 +00:00
Anton Lakotka 0d3f8cf91a [Gradle] Make additionalCompilerOptions to be Provider in native tasks
This fixes BC that was introduced previous commits

^KT-43293
2022-08-05 04:25:22 +00:00
Anton Lakotka e07ef85e91 [Gradle] Use ProjectLayout in execution phase instead of Project.buildDir
It gives more flexibility during execution phase. Since `buildDir` is
not sealed in cached task state. But instantiated during the execution
phase.

^KT-43293
2022-08-05 04:25:21 +00:00
Anton Lakotka 656d823048 [Gradle] Make customJvmArgs and commonizerClasspath to be Gradle Inputs
Since it is necessary to re-run commonzier once values of these
properties are changed.

^KT-43293
2022-08-05 04:25:20 +00:00
Anton Lakotka 2427fdf5e2 [Gradle] Code review NITs
^KT-43293
2022-08-05 04:25:19 +00:00
Anton Lakotka d8fd282b39 [Gradle] Use explicit factory methods instead of constructor override
In KotlinNativeToolRunner Settings classes

^KT-43293
2022-08-05 04:25:19 +00:00
Anton Lakotka 51034e4e46 [Gradle] Fix PlatformCommonizer classpath configuration consumption
Make sure that Commonizer Tasks consume correct classpath configuration

^KT-43293
2022-08-05 04:25:18 +00:00
Anton Lakotka 7fedf22946 [Gradle] Use defaultBuildOptions in testNativeTasks
^KT-43293
2022-08-05 04:25:17 +00:00
Anton Lakotka 528584deaa [Gradle] Fix testHmppTasksAreNotIncludedInGradleConfigurationCache test
^KT-43293
2022-08-05 04:25:17 +00:00
Anton Lakotka e00f9c25a1 [Gradle] Update ConfigurationCacheIT test for native tasks
Since GenerateProjectStructureMetadata supports Configuration Cache

^KT-43293
2022-08-05 04:25:16 +00:00
Anton Lakotka 78be7841a1 [Gradle] Read TC_PROJECT_PROPERTY during execution time
^KT-43293
2022-08-05 04:25:15 +00:00
Anton Lakotka c27e0fff24 [Gradle] Remove unnecessary comment from tests
^KT-43293
2022-08-05 04:25:15 +00:00
Anton Lakotka 4a5f9617db [Gradle] Don't use forUseAtConfigurationTime since it is not necessary
^KT-43293
2022-08-05 04:25:14 +00:00
Anton Lakotka f85762ab56 Make NativeDistributionCommonizerTask configuration cache compatible
^KT-43293 In Progress
2022-08-05 04:25:13 +00:00
Anton Lakotka 8cc9406b1f [Gradle] Use objectFactory.fileCollection instead of lazy
^KT-43293
2022-08-05 04:25:13 +00:00
Anton Lakotka 58d74b57e7 [Gradle] Remove unnecessary comment
^KT-43293
2022-08-05 04:25:12 +00:00
Anton Lakotka f89b88d7c2 [Gradle] Remove necessary @Input's in K/Native tasks
^KT-43293
2022-08-05 04:25:11 +00:00
Anton Lakotka a815864017 [Gradle][Test] Fix @Suppress("INVISIBLE_REFERENCE") as it incompatible with K2 2022-08-05 04:25:11 +00:00
Anton Lakotka a1d6ebd8ea [Gradle] Support Gradle Configuration Cache with KotlinNativeTest 2022-08-05 04:25:10 +00:00
Anton Lakotka 9fe9cf745c [Gradle][Test] Add tests for K/Native and Configuration Cache 2022-08-05 04:25:09 +00:00
Anton Lakotka 67dca1894b [Gradle][Test] Add freeArgs to BuildOptions 2022-08-05 04:25:09 +00:00
Anton Lakotka 495c089add [Gradle][Test] Fix KGP tests when min GradleVersion is higher than max supported 2022-08-05 04:25:08 +00:00
Anton Lakotka a74e451d19 [Gradle] Make CInteropGist Gradle Configuration Cache friendly
`sourceSets: Provider<Set<KotlinSourceSet>>` shouldn't be serialized to
Configuration Cache. Instead, only `allSourceSetNames` should be
serialized.
2022-08-05 04:25:07 +00:00
Anton Lakotka af717e03bd [Gradle] Support KotlinNativeLinkArtifactTask with Configuration Cache 2022-08-05 04:25:07 +00:00
Anton Lakotka eaa5d43a5d [Gradle] Support CInteropCommonizerTask with Gradle Configuration Cache 2022-08-05 04:25:06 +00:00
Anton Lakotka 15abdb7e35 [Gradle] Mark CInteropMetadataDependencyTransformationTask as incompatible with GCC 2022-08-05 04:25:05 +00:00
Anton Lakotka e6ca1c9744 [Gradle] Add FileCollection version of filterKlibsPassedToCompiler 2022-08-05 04:25:04 +00:00
Anton Lakotka 54024ccb09 [Gradle] Refactor ResolvedDependencyGraph to instantiate via secondary constructor 2022-08-05 04:25:04 +00:00
Anton Lakotka 3260c33c16 [Gradle] Refactor ResolvedDependencyGraph to use Lazy instead provider
It simplifies constructor API.
Also constructor changed from `operator fun invoke` to just a regular
factory method on companion object.
2022-08-05 04:25:03 +00:00
Anton Lakotka d086fedffc [Gradle] Use FileCollection instead lambda + lazy in KotlinNativeToolRunner
FileCollection is lazy on its own.
2022-08-05 04:25:02 +00:00
Anton Lakotka 1af804c897 [Gradle] Evaluate rootCacheDirectory on demand
To avoid failures in Gradle Configuration Cache due to illegal cacheKind
2022-08-05 04:25:02 +00:00
Anton Lakotka 9a5739555c [Gradle] Refactor NativeDistributionCommonizerCache to be GCC friendly
Change NativeDistributionCommonizerCache from "decorator" pattern to
be used as composition in related GradleTask. This allows to decouple
cache from actual commonizer instance. Allowing it to be stored in
Gradle Configuration Cache. Since Commonizer instance is created only
during execution phase.

Don't serialise `Lock` instance as Configuration Cache. Instead,
reinstantiate it everytime after deserialization.
2022-08-05 04:25:01 +00:00
Anton Lakotka 6e29075c3c [Gradle] Introduce TransientLazy for ResolvedDependencyGraph
Gradle Configuration Cache writer serialises objects that implement
java.lang.Serializable interface. SynchronizedLazyImpl does implement it
by initialising value before serialization.

This can cause issues for GCC because after initialisation value
can contain unsupported entities that Gradle can't save as
Configuration Cache.

Gradle can serialise lambdas so UnserializableLazy implementation
benefits from it.
2022-08-05 04:25:00 +00:00
Anton Lakotka 2f5ae70cef [Gradle] Fix kotlin-native-gradle-plugin to be compatible with KonanToolRunner
KonanToolRunner was changed to be compatible with
Gradle Configuration Cache.
2022-08-05 04:25:00 +00:00
Anton Lakotka 98c47a8a51 [Gradle] Fix validatedExportedLibraries to work with ResolvedDependencyGraph
Instead of ResolvedConfiguration
2022-08-05 04:24:59 +00:00
Anton Lakotka 4511c7faa9 [Gradle] Update testHmppTasksAreNotIncludedInGradleConfigurationCache
Generate PSM and K/Native tasks support Configuration Cache now
2022-08-05 04:24:58 +00:00
Anton Lakotka becdb84bbb [Gradle] Replace usage of ResolvedConfiguration to ResolvedDependencyResult
ResolvedConfiguration is a legacy API that doesn't work with
Gradle Configuration Cache.
ResolvedDependencyResult is cacheable but lightweight.
2022-08-05 04:24:57 +00:00
Anton Lakotka ebe7544464 [Gradle] Make evaluation of rootCacheDirectory lazy in Native task
It was broken due to 91779c298e5a819345a09c5bc9cca1b7c4a18797
And this change makes it behave as it was before
adding support for Configuration Cache.
2022-08-05 04:24:57 +00:00
Anton Lakotka edd1d72609 [Gradle] Add support of configuration cache for CInteropProcess 2022-08-05 04:24:56 +00:00