Commit Graph

83024 Commits

Author SHA1 Message Date
Nikita Bobko 8bb98f8f86 [imltogradle] Do not resolve transitive dependencies in gralde if don't resolve them in JPS
This fixes problems of Gradle not being possible to find transitive maven artifacts
if actually we don't need them
2021-06-09 15:16:18 +02:00
Pavel Kirpichenkov d76bb45716 [Commonizer] Add CommonizerHierarchicalIT
Test platform dependencies on leaf source sets
^KT-46716 Verification pending
2021-06-09 12:49:07 +00:00
Pavel Kirpichenkov 5f7576e546 [Commonizer] Use original K/N distribution libraries for leaf targets
^KT-46716
2021-06-09 12:49:04 +00:00
Mikhail Glukhikh c33608e009 FIR: don't render resolved type annotations in favor of attributes 2021-06-09 15:42:43 +03:00
Mikhail Glukhikh 06379ec587 FIR: handle varargs properly during annotation serialization 2021-06-09 15:42:42 +03:00
Mikhail Glukhikh da671eedc9 FIR: avoid CCE in constants during annotation serialization 2021-06-09 15:42:41 +03:00
Mikhail Glukhikh 3127fad23d FIR: more precise annotation argument serialization 2021-06-09 15:42:39 +03:00
Mikhail Glukhikh 491267b4f7 FIR2IR: convert annotations on local variables 2021-06-09 15:42:38 +03:00
Mikhail Glukhikh 77dd0ad396 FIR: handle custom attributes more precise 2021-06-09 15:42:37 +03:00
Mikhail Glukhikh 4f70f47fa6 FIR2IR: convert annotations on type parameters #KT-46967 Fixed 2021-06-09 15:42:36 +03:00
Svyatoslav Scherbina 3412c0bc53 Update kotlin-native/samples to 1.5.10 2021-06-09 12:35:05 +00:00
Andrey Zinovyev ddc9c1bd1b [FIR] Fix extension property reference resolution
On type with star projection
#KT-44372 Fixed
2021-06-09 15:15:28 +03:00
Mikhail Glukhikh 2b4ea8e6e7 Add forgotten test data 2021-06-09 14:59:57 +03:00
Vasily Levchenko 89b589846b Merge KT-MR-3224 from rrn/minamoto/kt-33364 2021-06-09 11:50:28 +00:00
Ilya Goncharov dd9ea9f9eb [Gradle, JS] Actualize versions of npm dependencies
^KT-46608 fixed
^KT-47176 fixed
2021-06-09 14:49:33 +03:00
pyos ade8b0a7d3 JVM_IR: box bound receiver before calling the reference constructor
This is needed for the inliner: since the information about Kotlin type
of the bound receiver is nowhere in the output binary, the inliner will
have no clue how to box inline class values. Moving the boxing outside
the object means the inliner doesn't need to know about it; from its
point of view, the captured value has type `Any`.
2021-06-09 14:36:07 +03:00
nataliya.valtman 117c99aee6 send build stat to ES 2021-06-09 13:25:10 +03:00
Sergey Igushkin 14a7e90c69 KT-38954: Filter Android attributes during publishing
* Always filter out the variant name attribute: it is never requested
  by consumers, while its presence makes Gradle count it as an
  unmatched attribute, sometimes leading to ambiguity;

* Filter out the build type attribute: if all variants have the same
  build type, then remove the build type attribute from all variants;
  Otherwise, remove the build type attribute from the release variants
  in order to make them compatible with all other consumer's build 
  types.

  * Add an opt-out flat for always keeping the attribute:
    "kotlin.android.buildTypeAttribute.keep" Gradle property

Issue #KT-38954 Fixed
2021-06-09 10:18:15 +00:00
Vasily Levchenko 79600f32d2 [codegenerator][refactor] extract method for tramboline generation 2021-06-09 11:39:57 +02:00
Vasily Levchenko 0651f7de20 [kotlin-native][tests] kt-33364 test added 2021-06-09 11:39:56 +02:00
Vasily Levchenko bebede9e4f [codegeneration][debug info] enchance debugger behaviour for paramterless when
- generates tramboline like a11b07f6c3 on -Xg-generate-when-marker=enable
- fixes issue KT-33364
2021-06-09 11:39:55 +02:00
Vladimir Dolzhenko de76aeb9d1 Optimize SdkInfo lookup for a huge monorepo with no SdkInfo
DFS of SdkInfo on moduleInfo and reuse cached libraryInfo dependencies
fix traverse order

#KT-47065 Fixed
Relates to #KT-46622
2021-06-09 08:31:46 +00:00
Andrey Zinovyev 972cd9e9e7 [FIR] Fix PACKAGE_CANNOT_BE_IMPORTED diagnostic
Don't report it when there is a function/property with the same name as
package
2021-06-09 09:02:49 +03:00
Yahor Berdnikau ec705d88a5 Allow to enable Gradle debug for particular builds.
^KT-45745 In Progress
2021-06-08 21:05:39 +02:00
Yahor Berdnikau 90238978ee Update block to print build info on error.
^KT-45745 In Progress
2021-06-08 21:05:38 +02:00
Yahor Berdnikau b0b646037e Print build output on build result assertion failure.
^KT-45745 In Progress
2021-06-08 21:05:38 +02:00
Yahor Berdnikau 5b60ef7d54 Allow to enable force output for specific builds.
^KT-45745 In Progress
2021-06-08 21:05:38 +02:00
Yahor Berdnikau 8b17888a18 Fix typo in annotation name.
^KT-45745 In Progress
2021-06-08 21:05:35 +02:00
Aleksei.Cherepanov 35c067b215 Fix import for JPS build of Kotlin repo
Changed link of configuration on TC for getting artifacts
from "Compiler Dist (202) and Maven Artifacts"
to "Kotlin / Kotlin Public / Aggregate"
2021-06-08 22:01:31 +03:00
Denis.Zharkov 2653565f56 FIR: Support exhaustive whens on subjects of intersection type 2021-06-08 18:59:48 +03:00
Anton Lakotka c8b9a3a6f0 Disallow unsafe reads of KPM PluginData from Compile Task 2021-06-08 15:49:05 +00:00
Anton Lakotka 52abecab43 Rename sensitive flag to isTransient and inverse logic, add file outputs
isTransient with default value as false makes it a bit more readable
Some Compiler Plugins can use file outputs properties to dump some data
there and gradle can support incremental build
with file outputs.
2021-06-08 15:49:05 +00:00
Anton Lakotka 70a2678bbc Add integration test for kpm compiler plugin sensitive options 2021-06-08 15:49:04 +00:00
Anton Lakotka c01be75f47 Reuse code in MetadataCompilationTasksConfigurator for native task 2021-06-08 15:49:03 +00:00
Anton Lakotka 28fe070a2f Track plugin options with indices 2021-06-08 15:49:02 +00:00
Anton Lakotka bc7ff04f1f Store sensitive plugin options in Task inputs 2021-06-08 15:49:01 +00:00
Anton Lakotka 9e084a7256 Fix overload call of project.files in abstractVariants.kt 2021-06-08 15:49:01 +00:00
Anton Lakotka 26a2509ebb Add basic test for Kotlin Project Model compiler plugins 2021-06-08 15:49:00 +00:00
Anton Lakotka a0fb5c31ea Don't configure runtimeDependencyFiles during variant instantiation 2021-06-08 15:48:59 +00:00
Anton Lakotka 5a58c1c437 [Kotlin Project Model] Add compiler plugin support 2021-06-08 15:48:58 +00:00
Nikita Bobko 16e6fe0e08 Fix compilation for some Kotlin plugin modules when IJ infra is attached to kotlin repo
For example it fixes compilation of `:kotlin-ide.kotlin.generators:testClasses`

This commit fixes that Gradle tries to find jars of 202 IDEA in ivy repo of 211 IDEA:
```
* What went wrong:
Execution failed for task ':kotlin-ide.kotlin.tests-common:compileTestKotlin'.
> Could not resolve all files for configuration ':kotlin-ide.kotlin.tests-common:testCompileClasspath'.
   > Could not find extensions-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
     Searched in the following locations:
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/extensions.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/extensions.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/extensions.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/extensions.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/extensions-211.6693.111.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/extensions.jar
   > Could not find guava-29.0-jre-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
     Searched in the following locations:
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/guava-29.0-jre.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/guava-29.0-jre.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/guava-29.0-jre.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/guava-29.0-jre.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/guava-29.0-jre-211.6693.111.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/guava-29.0-jre.jar
   > Could not find asm-all-8.0.1-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
     Searched in the following locations:
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/asm-all-8.0.1.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/asm-all-8.0.1.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/asm-all-8.0.1.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/asm-all-8.0.1.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/asm-all-8.0.1-211.6693.111.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/asm-all-8.0.1.jar
   > Could not find streamex-0.7.2-211.6693.111.jar (kotlin.build:ideaIC:211.6693.111).
     Searched in the following locations:
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/lib/streamex-0.7.2.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/streamex-0.7.2.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/intellij-core/211.6693.111/artifacts/streamex-0.7.2.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/artifacts/plugins/ideaIC/lib/streamex-0.7.2.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/sources/streamex-0.7.2-211.6693.111.jar
         file:/home/bobko/.gradle/kotlin-build-dependencies/repo/kotlin.build/ideaIC/211.6693.111/streamex-0.7.2.jar
```
2021-06-08 17:18:35 +02:00
Nikita Bobko bf287c0b85 [imltogradle] Don't generate unnecessary tests-jar with real dependencies when a module doesn't have any source root
This helps to prevent "fake" circular dependencies when
module A depends on tests of module B but module B doesn't have test source roots

In particular this commit fixes when running `:kotlin-ide.kotlin.generators:testClasses` task:
```
Circular dependency between the following tasks:
:kotlin-ide.kotlin.gradle.gradle-tooling:compileTestJava
+--- :kotlin-ide.kotlin.gradle.gradle-tooling:compileTestKotlin
|    \--- :kotlin-ide.kotlin.test-framework:testJar
|         +--- :kotlin-ide.kotlin.test-framework:compileTestKotlin
|         |    +--- :kotlin-ide.kotlin.idea:testJar
|         |    |    +--- :kotlin-ide.kotlin.idea:compileTestKotlin
|         |    |    |    \--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar
|         |    |    |         +--- :kotlin-ide.kotlin.gradle.gradle-tooling:compileTestKotlin (*)
|         |    |    |         \--- :kotlin-ide.kotlin.gradle.gradle-tooling:testClasses
|         |    |    |              \--- :kotlin-ide.kotlin.gradle.gradle-tooling:compileTestJava (*)
|         |    |    \--- :kotlin-ide.kotlin.idea:testClasses
|         |    |         \--- :kotlin-ide.kotlin.idea:compileTestJava
|         |    |              +--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar (*)
|         |    |              \--- :kotlin-ide.kotlin.idea:compileTestKotlin (*)
|         |    \--- :kotlin-ide.kotlin.jvm:testJar
|         |         +--- :kotlin-ide.kotlin.jvm:compileTestKotlin
|         |         |    +--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar (*)
|         |         |    +--- :kotlin-ide.kotlin.idea:testJar (*)
|         |         |    \--- :kotlin-ide.kotlin.repl:testJar
|         |         |         +--- :kotlin-ide.kotlin.repl:compileTestKotlin
|         |         |         |    \--- :kotlin-ide.kotlin.idea:testJar (*)
|         |         |         \--- :kotlin-ide.kotlin.repl:testClasses
|         |         |              \--- :kotlin-ide.kotlin.repl:compileTestJava
|         |         |                   +--- :kotlin-ide.kotlin.idea:testJar (*)
|         |         |                   \--- :kotlin-ide.kotlin.repl:compileTestKotlin (*)
|         |         \--- :kotlin-ide.kotlin.jvm:testClasses
|         |              \--- :kotlin-ide.kotlin.jvm:compileTestJava
|         |                   +--- :kotlin-ide.kotlin.gradle.gradle-tooling:testJar (*)
|         |                   +--- :kotlin-ide.kotlin.idea:testJar (*)
|         |                   +--- :kotlin-ide.kotlin.jvm:compileTestKotlin (*)
|         |                   \--- :kotlin-ide.kotlin.repl:testJar (*)
|         \--- :kotlin-ide.kotlin.test-framework:testClasses
|              \--- :kotlin-ide.kotlin.test-framework:compileTestJava
|                   +--- :kotlin-ide.kotlin.idea:testJar (*)
|                   +--- :kotlin-ide.kotlin.jvm:testJar (*)
|                   \--- :kotlin-ide.kotlin.test-framework:compileTestKotlin (*)
\--- :kotlin-ide.kotlin.test-framework:testJar (*)
```
2021-06-08 17:15:17 +02:00
Sergey Bogolepov bcd28615a6 [Native] Add initial version of LLVM buildscript
Previously there was no determined way to build LLVM for Kotlin/Native.
This commits adds a Python script that allows to do so on all hosts.
2021-06-08 14:42:43 +00:00
Ilya Matveev 1530a0823f [K/N] Use finalization task to generate report for runtime tests
The approach with doLast doesn't work if the test binary failed.
This patch uses a finalization task instead to ensure that we
process the XML report regardless of whether the tests pass
or fail.
2021-06-08 12:44:14 +00:00
Ilya Matveev f08d473d3c [K/N][Runtime tests] Support << operator for thread states 2021-06-08 12:44:13 +00:00
Elena Lepilkina 7ed22360f9 [K/N] Use in array varargs optimized implementations of set operators without bound checks 2021-06-08 11:59:56 +00:00
Elena Lepilkina 2cb3a20733 [K/N] Added functions for set/get array operatorswithout bounds check 2021-06-08 11:59:56 +00:00
Leonid Startsev dd21326425 Create a copy of incorrectly deserialized parent's writeSelf function
To avoid problems during code generation when INVOKEDYNAMIC
is used instead of static

#KT-47161 Fixed
2021-06-08 11:53:47 +00:00
Vladimir Ivanov 7c7905b55c [Native] Disable unaligned float test (not supported yet) (#4434) 2021-06-08 13:18:58 +03:00
Dmitriy Novozhilov 773fc25587 Fix compilation after 3572a96b 2021-06-08 12:16:03 +03:00