Commit Graph

9498 Commits

Author SHA1 Message Date
sebastian.sellmair ed152e74a0 [Gradle] Add 'CATEGORY_ATTRIBUTE=LIBRARY' attribute to configurations
^KT-36941 Verification Pending

This is necessary to fix:
https://youtrack.jetbrains.com/issue/KTIJ-10769
by preventing confusion with the `samplessources` variant.
2021-08-25 11:35:33 +00:00
Ilya Gorbunov 43a614ffcd Make builder collection implementations serializable KT-39328
Collections returned by collection builders are now serializable in
their read-only state.
The builder mutable collections inside collection builder lambda,
however, are not.
2021-08-24 23:13:57 +00:00
Ilya Chernikov 4243bafd1d Scripting: implement correct disposal of REPL state on finalization
#KT-47927 fixed
2021-08-24 21:39:38 +03:00
Ilya Chernikov a45e31720c Make state of the default REPL compiler explicit and replaceable
restores proper object hierarchy in case the legacy REPL infrastructure
2021-08-24 21:39:37 +03:00
Ilya Chernikov 61e5f68b8d Scripting invalidate compiled cache if a dependency is missing
#KT-48303 fixed
2021-08-24 21:39:35 +03:00
Ilya Chernikov e60e80f19a Scripting: improve reporting on cyclic dependency
#KT-48177 fixed
the issue is in fact fixed by the previous commit (report error
on duplicated import) by normalizing import path before processing,
but here we're making error reporting nicer for the case.
2021-08-24 21:39:33 +03:00
Ilya Chernikov c204d7a86f Scripting: report error on duplicate import
#KT-48177 fixed
(due to the path normalization)
2021-08-24 21:39:32 +03:00
nataliya.valtman 260d301100 Report compiler performance data to ES 2021-08-24 16:33:13 +03:00
nataliya.valtman 7357aeb1c9 Add output size to ES metrics 2021-08-24 16:33:12 +03:00
Stanislav Erokhin 9becb2c468 Add compiler performance metrics
WIP
2021-08-24 16:33:12 +03:00
nataliya.valtman 64da19cb2d Add Artifact Transform stat into ES 2021-08-24 16:33:11 +03:00
Sergey Bogolepov e9e986dd61 Adjust CommonizerIT to MinGW cross-compilation 2021-08-24 19:14:56 +07:00
Ilya Gorbunov d726b00c33 stdlib-docs: Download dokka from teamcity 2021-08-24 10:48:35 +00:00
Ilya Gorbunov 64021f65e4 stdlib-docs: Allow to set dokka_version with property 2021-08-24 10:48:34 +00:00
Ilya Gorbunov aba0c715bd stdlib-docs: dokka can't stand windows path separator in sourcelink path 2021-08-24 10:48:34 +00:00
Ilya Gorbunov 3e82a20f16 stdlib-docs: update ant version 2021-08-24 10:48:34 +00:00
Svyatoslav Scherbina 5e789f86ee Support Native binary options in Gradle
Both project properties and per-binary DSL are available.
2021-08-24 09:36:24 +00:00
Mikhail Glukhikh 18cc498763 Fix deprecated smart casts in sources (around KT-48101) 2021-08-24 12:32:30 +03:00
Steven Schäfer de9d2919a8 JVM Metadata: Add a bit to mark anonymous objects in inline functions
Anonymous objects in the scope of an inline functions are copied to
all call-sites. This makes them part of the public ABI of a Kotlin
library.

We introduce a flag to mark all classes in the scope of an inline
function. When compiling with assertions enabled, we check that
this flag is set whenever we inline an anonymous object from another
module.
2021-08-23 18:25:33 +02:00
Andrey Uskov ebcc6eec97 Fixed setting target version if toolchain is not set
#KT-48226  Fixed
2021-08-23 11:25:03 +03:00
sebastian.sellmair 487524f6b0 [Gradle] setupCInteropPropagatedDependencies: retain task dependencies
^KT-47523
2021-08-20 13:06:43 +00:00
sebastian.sellmair 882d72b1f7 [Gradle] Implement setupCInteropPropagatedDependencies
This commit will forward/propagate cinterops to intermediate source sets
with only one native dependent (and their metadata compilation)

^KT-47523 Verification Pending
2021-08-20 13:06:43 +00:00
sebastian.sellmair fee670e1a5 [Gradle] Add test and assertions to cover ^KT-47523 2021-08-20 13:06:42 +00:00
nataliya.valtman 7038b02933 Add build uuid, time and hostname fields to ES stat 2021-08-20 10:48:43 +03:00
nataliya.valtman ae3f0a5158 Update custom values format 2021-08-20 10:48:37 +03:00
nataliya.valtman 96a22d48f8 Remove support of Gradle 6.0 or less 2021-08-20 10:48:35 +03:00
nataliya.valtman c8254676c1 Add non Incremental reason to build scan 2021-08-20 10:48:31 +03:00
nataliya.valtman 2114e048dc Add statistic to buildScan 2021-08-20 10:48:28 +03:00
Ilya Goncharov 423ecfe640 [Gradle, JS] NodeJsSetup and yarnSetup are not cacheable
^KT-48332 fixed
2021-08-20 10:43:46 +03:00
Ilya Goncharov 7d3830ba7d [Gradle, JS] Use stable version of webpack-dev-server 2021-08-19 15:06:16 +03:00
Hung Nguyen 16dfdb620e KT-45777: Add custom serialization for classpath snapshot
Also add a few commonly-used classes/methods to externalizers.kt to
allow reuse.

Bug: KT-45777
Test: New ClasspathSnapshotSerializerTest
2021-08-19 13:50:26 +03:00
Alexander Likhachev 0d2a514a70 [Gradle, JS] Fix NPM resolution skip condition for js compilation
#KT-48241 Fixed
2021-08-19 12:07:23 +03:00
Alexander Likhachev b74253521e [Gradle, JS] Add test for KT-48241 2021-08-19 12:06:32 +03:00
Ilya Goncharov 16f41bd80c [Gradle, JS] Use webpack-dev-server rc.1 2021-08-18 15:50:38 +03:00
Sebastian Sellmair 21f7e16ee6 [Gradle] NativeDistributionCommonizationCache: Acquire FileLock
A `.lock` file will be acquired before running the native
distribution commonizer. This is done to protect data corruption
when multiple process try to commonize at the same time.

This could happen when e.g. two new projects are opened that
both trigger the commonizer during syncing.

^KT-46343 Verification Pending
2021-08-18 09:22:46 +00:00
Ilya Goncharov f37d880964 [Gradle, JS] Add test on valid of webpack config
^KT-48273 fixed
2021-08-18 11:56:19 +03:00
Ilya Goncharov a7cc275c7d [Gradle, JS] Update webpack-dev-server
^KT-48273 fixed
2021-08-17 14:44:29 +03:00
Yahor Berdnikau e7a08b14e3 Fix 'jvmTarget' is not updated on reusing configuration cache.
Before this change 'kotlinOptions.jvmTarget' was updated
on 'providedJvm' property value calculation, but, as configuration
cache reuses property value from the cache - 'jvmTarget' update does not
 happen.

This change adds additional call to set 'jvmTarget' on task execution
 phase to ensure even on configuration cache reuse field is set
 to correct value. Update is based whether 'providedJvm' property is set
 or not.

^KT-48226 Fixed
2021-08-17 09:13:29 +00:00
Dmitriy Dolovov 4049cf94b1 [Gradle][Native] Mute BuildCacheRelocationIT.testRelocation on MinGW 2021-08-17 11:01:08 +03:00
Dmitriy Dolovov da72f26d94 [IR][Tests] Unmute NativeIrLinkerIssuesIT (as far as K/N version is already updated)
^KT-44626
2021-08-17 07:53:47 +00:00
Dmitriy Dolovov cd08dc49a0 [IR][Tests] Mute NativeIrLinkerIssuesIT until K/N version is updated
^KT-44626
2021-08-17 07:53:46 +00:00
Dmitriy Dolovov 4edc1239ac [IR] Use only ASCII-printable chars in IR linker error reports
^KT-44626
2021-08-17 07:53:46 +00:00
Dmitriy Dolovov af12d61388 [IR] Enhance error reporting for IR linking issues
^KT-44626

Support correct error reporting both with native static caches and without native static caches.
2021-08-17 07:53:45 +00:00
Dmitriy Dolovov 3cd43dced4 [IR] Fix tests for IR linking error reporting
- Run "ktor 1_5_4 and coroutines 1_5_0-RC-native-mt (KT-46697)" test only on Mac host
- Fix application entry point function FQN
- Use OS-neutral URI for configuration of local Maven repos instead of OS-specific path

^KT-44626
2021-08-17 07:53:45 +00:00
Sergey Bogolepov db12a96e54 Fix test that was broken by e159392d by disabling native caches. 2021-08-12 18:02:23 +03:00
Yahor Berdnikau 3acb96e474 Allow running KotlinJavaToolchainTest on any user JDK. 2021-08-12 10:00:23 +02:00
Bingran c57302abba Only check ExternalDependency when customizing kotlin dependencies
This commit fixes the issue where kgp checks group/version of project
dependencies which is uncompatible with project isolation. With this
change, kgp will only check ExternalDependency which should be enough
for setting up kotlin dependencies.

This change also changes the way we apply cache redirector gradle
files to all projects when setting up test projects. To make it
compatible with project isolation, we should move away from using
project.getAllProjects() function.

^KT-47792 Fixed
Test: existing + SimpleKotlinGradleIT.testProjectIsolation
2021-08-12 09:51:20 +02:00
Sergey Bogolepov e159392d22 [K/N] Enable caches for iosArm64 and linuxX64 by default 2021-08-11 06:38:59 +00:00
Ilya Goncharov 40d19b50c5 [Gradle, JS] Use Gradle's hashers 2021-08-10 18:45:09 +00:00
Ilya Goncharov bfcd954dd3 [Gradle, JS] Add test on not updating Node.JS if it was downloaded
^KT-47845 fixed
2021-08-10 18:45:09 +00:00