Commit Graph

91186 Commits

Author SHA1 Message Date
Sergey Igushkin 8676685ebc Adjust KPM publication for legacy model publication requirements 2022-02-14 15:04:58 +00:00
Sergey Igushkin 42fa23398b KPM publication setup: use lowercase artifact IDs 2022-02-14 15:04:57 +00:00
Sergey Igushkin 87c3a1b531 Prototype reverse model mapping: represent legacy-only targets in KPM 2022-02-14 15:04:57 +00:00
Sergey Igushkin 57b85e155c KPM/Gradle: don't include host-specific klibs into the common metadata 2022-02-14 15:04:56 +00:00
Sergey Igushkin c3fe4e7fb2 KPM/Gradle: disable metadata compilations for JVM & JS shared fragments 2022-02-14 15:04:56 +00:00
Sergey Igushkin dbb34a44f0 Map Kotlin/Native compilation to the supported-platform KPM variants 2022-02-14 15:04:56 +00:00
Sergey Igushkin c67f80e1f3 Map Kotlin/Native compilation to the supported-platform KPM variants 2022-02-14 15:04:55 +00:00
Sergey Igushkin 736a33b182 Fix missing K/N compilation task dependency in the compilationOoutputs 2022-02-14 15:04:55 +00:00
Sergey Igushkin 992f7bf3c1 Disable o.j.k.multiplatform publications with KPM model mapping 2022-02-14 15:04:54 +00:00
Sergey Igushkin bc65bb0775 Improve friend paths calculation in KPM: use actual resolution results
Avoid adding compilation outputs of all variants to the friend paths, as
this leads to false task dependencies, and also the real file system
paths on the classpath may not point to the compilation outputs and will
rather use the *Elements artifacts.
2022-02-14 15:04:54 +00:00
Sergey Igushkin 3f49217cc9 Prepare intermediate layer of model mapping in Kotlin compilations
Extract all logic and internal model that may be different in different
modes to a separate entity called "compilation details"
2022-02-14 15:04:54 +00:00
Sergey Igushkin 8753ea592f KPM-mapped-model: simple mapping of JVM variants 2022-02-14 15:04:53 +00:00
Sergey Igushkin bc8f795f71 Fix BasePluginConvention deprecation in KGP 2022-02-14 15:04:53 +00:00
Sergey Igushkin 2c6c2c3929 Improve registering resources tasks in compilations: support laziness 2022-02-14 15:04:52 +00:00
Sergey Igushkin 876ab4ae52 KPM minor fix registering JVM compilation classesDirs 2022-02-14 15:04:52 +00:00
Sergey Igushkin 0acf923d6a Rewrite the checks for the presence of KPM: adapt them to mapped models 2022-02-14 15:04:52 +00:00
Sergey Igushkin d495c5b604 Introduce a container for the KPM model for different kinds of projects 2022-02-14 15:04:51 +00:00
Sergey Igushkin a998e2d291 Model mapping experiment: map source sets to KPM fragments
TODO: keep type compatibility,
      inject the behavior in DefaultKotlinSourceSet
2022-02-14 15:04:51 +00:00
Dmitry Petrov 8274709621 IR fix substituteType for DNN type 2022-02-14 14:16:56 +00:00
Denis.Zharkov 58408d8a78 FIR: Fix incorrect qualifier resolution in case of type parameters
^KT-51265 Fixed
2022-02-14 17:16:22 +03:00
Sergey Bogolepov 52c8b6166c [K/N] Fix filecheck_function_attributes_at_callsite test 2022-02-14 13:38:51 +00:00
Sergey Bogolepov fbbe5cbd03 [K/N] Disable filecheck tests in some cases 2022-02-14 13:38:50 +00:00
Sergey Bogolepov b4cbe703cd [K/N] Test for KT-50970 2022-02-14 13:38:50 +00:00
Sergey Bogolepov ad793ac624 [K/N] Support cross targets in FileCheckTest
Also mark property's getter with Input and Optional annotations instead of
property itself.
2022-02-14 13:38:49 +00:00
Sergey Bogolepov 34cb79fc9f [K/N] Fix KT-50970
Force generation of ARM instruction set for iosArm32 and
watchosArm32 targets for C++ code. There is no need for such
adjustments for Kotlin code because we don't specify any target
features in IrToBitcode and compiler backend infers target features
from target architecture (which is armv7* and not thumbv7).
2022-02-14 13:38:49 +00:00
Yahor Berdnikau a26c7ace8b Remove accidentally left test debug parameters 2022-02-14 16:08:22 +03:00
Pavel Punegov 423e5a6530 [K/N][build] Rewrite endorsed libraries build to kts 2022-02-14 15:58:39 +03:00
Pavel Punegov 361d922119 [K/N][build] Rewrite kotlinx.cli build to kts
Rewrite to kts and use konan plugin instead of simple JavaExec task.
Produce cache in the project instead of the upper one.
2022-02-14 15:58:38 +03:00
Victor Petukhov fd6500c167 [FE 1.0] Set a fixation priority for self type variables less than any of ready for fixation kinds
^KT-51040 Fixed
^KT-49838
2022-02-14 15:43:53 +03:00
Victor Petukhov 78f4b9f1cd [FE 1.0] Fix mistakes in error messages for resolution ambiguity with stub types
^KT-51022 Fixed
2022-02-14 15:43:47 +03:00
Victor Petukhov a54c9edaad [FE 1.0] Report progressions resolve changing warning while calling Java methods which pass Collection
^KT-51062 Fixed
2022-02-14 15:43:43 +03:00
Ilmir Usmanov 8f23fc54a4 Mangle bridges if its return type is not inline
#KT-51235 Fixed
2022-02-14 13:06:13 +01:00
Dmitriy Dolovov 7ad69ea8eb [Native][tests] Regenerated native tests 2022-02-14 13:50:40 +03:00
Dmitriy Dolovov f62dcf65fc [Native][tests] Fix generation of *.def file in accidentally disappeared dir 2022-02-14 13:41:00 +03:00
Dmitriy Dolovov 334dffd3e4 [Native][tests] Remove external tests from old test infra 2022-02-14 13:41:00 +03:00
Dmitriy Dolovov 4f0785cbb2 [Native][tests] Rename test tag "klib" to "klib-abi" to be more specific 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov ca45252143 [Native][tests] Add separate Gradle tasks to run tests for stdlib and kotlin-test libraries 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov 174f4cd220 [Native][tests] Rename Gradle task "externalTest" to "codegenBoxTest" 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov e5f819ffad [Native][tests] Allow using "test" task in dev environment 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov 45abf752ec [Native][tests] Don't ignore test failures 2022-02-14 13:40:59 +03:00
Dmitriy Dolovov 22d5d7343b [Native][tests] Drop obsolete "kotlin.internal.native.test.useCache" property 2022-02-14 13:40:59 +03:00
Dmitry Savvinov ea466353fb Dont store type refinement mode in analysis flags
Instead, check the refiner from the DI-container or refiner from
capability of a module descriptor.

The reason is because in the IDE there might be multiple
ResolutionFacades (-> multiple DI-containers -> multiple module
descriptors) for one and the same IDE module, with different refinement
settings.
However, due to how the code is written, it's hard to have
different LanguageVersionSettings for one and the same module.

After this commit the refinement settings are determined by the
moduleDescriptor capabilities, which is much easier to tweak

See usage of that change in Kotlin IDE Plugin (commit is linked to the
YT issue)

^KTIJ-20775
2022-02-14 13:08:50 +03:00
Svyatoslav Scherbina 5afbbecea4 Native: rename Xcode.current to .findCurrent()
To reflect that it is a non-trivial operation with possible performance
overhead.
2022-02-14 08:52:14 +00:00
Svyatoslav Scherbina e92f7b5ec3 Native: don't cache Xcode.current between different compiler invocations
The compiler might be executed in a Gradle daemon process,
so current Xcode might actually change between different invocations.

^KT-49496 Fixed
2022-02-14 08:52:13 +00:00
Svyatoslav Scherbina 86ad804848 Native: remove support for pre-Xcode 12 libclang_rt
Kotlin/Native doesn't support Xcode versions older than 12.5 anymore,
so just remove the obsolete code.
2022-02-14 08:52:13 +00:00
Dmitry Petrov f5e4c72f06 IR fix IrType.makeNullable() for DNN type 2022-02-11 18:24:34 +00:00
Mikhail Glukhikh 705d960b8f FIR2IR: fix behavior of implicitCastOrExpression for DNN types 2022-02-11 18:24:34 +00:00
Dmitry Petrov 53210770a6 IR use abstract classes in IrType hierarchy 2022-02-11 18:24:33 +00:00
Dmitry Petrov 54299e83e8 JVM reorganize AbstractTypeMapper.mapType 2022-02-11 18:24:33 +00:00
Dmitry Petrov 7b18d69f5f FIR+JVM_IR DNN-related fixes 2022-02-11 18:24:33 +00:00