Commit Graph

720 Commits

Author SHA1 Message Date
Ilya Chernikov 0d3964f22e Test, scripting: add infra for script tests with customizable def
based on the regular compiler tests infrastructure, but adding
directives that can customize the definition from testdata.
So far only default imports and provided properties are supported, but
the infrastructure is easily extendable to other customizations.
Another limitations that provided properties are not supported for
the black box tests - the constructor parameters computing code
should be adapted to support it.
Note: in order to pick up the customized definition, the script files
should have an extension .test.kts
2024-02-21 07:47:15 +00:00
Nikolay Krasko 031d0359d4 Remove compose compiler-daemon projects registration 2024-02-20 22:24:21 +00:00
Ivan Kylchik 6dccb60afe [IR] Add new module to keep all IR inline related code
#KT-64806
2024-02-19 20:14:16 +00:00
Andrey Yastrebov 60071cbb54 KT-65740 Create swift-export-embeddable module 2024-02-19 10:55:55 +00:00
Dmitriy Dolovov 83cc0d75a7 [kotlinp] Support rendering KLIB metadata using "kotlinp" format
This commit includes:
1. New subproject :tools:kotlinp-klib that contains the facade for
   rendering the metadata in "kotlinp" format given just
   KlibModuleMetadata
2. A tool for computing (external) IR signatures that are not directly
   available in metadata: KlibKotlinpExternalSignatureComputer

^KT-62340
2024-02-15 15:38:27 +00:00
Leonid Startsev 09e89db82f Change kotlinx- to kotlin- in kotlin-metadata-jvm and related projects
Change package, artifact group, artifact name, and Gradle module name to
kotlin-metadata and kotlin-metadata-jvm, respectively.

In Kotlin 2.0, kotlin-metadata-jvm library is promoted to stable, and is
a part of Kotlin distribution now.

Note that kotlinx-metadata-klib is left with org.jetbrains.kotlinx group, artifact name and package
because -klib part is considered not stable and for internal use. Since it is still published via Sonatype,
it should have kotlinx group. Therefore, it will have both classes from kotlin.metadata and kotlinx.metadata packages. This is not a problem, because we already had kotlinx.metadata split package between -jvm and -klib before.

#KT-63219 Fixed
2024-02-15 15:32:33 +00:00
cristiangarcia f77c08a821 Fail fast, and with a descriptive error, if both configuration-cache and native are enabled
Required for KTI-1553
2024-02-14 14:45:15 +00:00
Dmitriy Dolovov d30efdb001 [kotlinp] Split :tools:kotlinp into "common" and "jvm" subprojects
The "common" subproject keeps only backend-neutral logic and depends
only on :kotlinx-metadata library. It takes the name of the former
project - :tools:kotlinp

The "jvm" subproject depends on the "common" one and also depends
on :kotlinx-metadata-jvm. It gets the new name - :tools:kotlinp-jvm

There is a lot of touched files in this commit. The majority of them
is just moved files (tests, test data, etc).

Only the following files were actually modified:
  .space/CODEOWNERS
  build.gradle.kts
  libraries/tools/abi-comparator/build.gradle.kts
  libraries/tools/kotlinp/build.gradle.kts
  libraries/tools/kotlinp/jvm/build.gradle.kts
  plugins/kapt3/kapt3-compiler/build.gradle.kts
  settings.gradle

 ^KT-62340
2024-02-13 21:01:08 +00:00
Artem Olkov b6c805bbb6 Remove KotlinSirOrigin hierarchy in favour of direct AA usage #KT-65335 Fixed
Merge-request: KT-MR-14229
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-09 18:34:52 +00:00
Alexander Shabalin 4468167a64 [K/N] Move kotlin-native/utilities/basic-utils to compiler/utils 2024-02-08 20:43:11 +00:00
Brian Norman aa34282efb [PowerAssert] Integrate with build
^KT-63617 Fixed
2024-02-07 21:51:17 +00:00
Artem Olkov de6a27aeeb KT-65123: move Swift Export Compiler Plugin into swift-export-standalone module
Merge-request: KT-MR-14031
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-01-29 10:32:09 +00:00
Ilya Gorbunov 000db0bb44 [kotlin-test] Move kotlin-test integration tests project 2024-01-23 17:57:48 +00:00
Pavel Punegov 6b409d87f5 [K/N][test] Support library for running Kotlin/Native tests with XCTest
This change adds a library with cinterop that has XCTest wrapper around
Kotlin/Native tests (that are @kotlin.test.Test marked methods).
This library can be compiled with either test code using the option
`-produce test_bundle` to make a loadable test bundle or used inside
the existing ObjC/Swift tests if compiled to a framework.

The basic idea is to make XCTest be able to resolve separate test cases
and correctly show them in test reports. This was achieved by wrapping
test cases with dynamically created invocation methods. Test listeners
are integrated with XCTest Observation to make it possible to have 
the same ability to report with GTest or TeamCity logging.

Gradle build files use MPP Gradle plugin and use a bootstrap version
of K/N. Property `kotlin.native.home` was moved to the kotlin-native
subproject to not override this project's K/N distribution, that is
being used by the KGP with the same property.

This is a part of ^KT-58928


Merge-request: KT-MR-13268
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2024-01-18 15:04:37 +00:00
Artem Kobzar dfe2d8651e [K/JS] Prepare JS Plain Objects plugin to publication 2024-01-17 10:52:58 +00:00
Dmitriy Novozhilov dbbfb23fa9 [Build] Fix JPS build issue caused by :plugins:jso module 2024-01-11 12:48:34 +00:00
Artem Kobzar 300702a7e7 [K/JS] Create JavaScript Simple Object plugin that helps create typed JS objects 2024-01-10 16:30:02 +00:00
Sebastian Sellmair e409c60780 [ObjCExport] Split ObjCExport into K1 and Analysis Api implementation
FL-23390
^KT-64168 Fixed
2024-01-08 15:25:19 +00:00
vladislav.grechko 34bac48541 Add JVM ABI K1/K2 consistency tests 2023-12-26 10:18:19 +00:00
Nikolay Krasko d3322d515f Update list of compose modules 2023-12-20 12:18:18 +00:00
Ilya Gorbunov e0bc0b81c6 [kotlin-test] Drop subprojects unneeded anymore KT-61969 2023-12-13 15:40:25 +00:00
Artem Olkov 5fcdd4a9f6 KT-63748: Pack Swift Export Frontend into compiler plugin
Co-authored-by: Sergej Jaskiewicz <jaskiewiczs@icloud.com>


Merge-request: KT-MR-13351
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2023-12-13 10:40:38 +00:00
Sergej Jaskiewicz 0d2032f3ef [SIR] Auto-generate the Swift IR tree
Co-authored-by: Gleb Lukianets <gleb.lukianets@jetbrains.com>
2023-12-08 10:09:09 +00:00
Marco Pennekamp ee7c67ba11 [LL] Add LL API module for JDK 11 tests to support Lincheck tests
- Lincheck is compiled with JDK 11 and the `low-level-api-fir` module is
  based on the JDK 8 toolchain, so we need to add a new module with a
  JDK 11 toolchain to support Lincheck tests. We cannot bump
  `low-level-api-fir` to JDK 11 because `low-level-api-fir-for-ide`
  requires it to be based on a JDK 8 toolchain.
- Using a Gradle test suite is unfortunately not an option, because
  `low-level-api-fir-for-ide` will think that the whole
  `low-level-api-fir` module is compiled with JDK 11 if just a single
  test suite has this toolchain.

^KT-62136
2023-12-05 21:31:32 +00:00
Sebastian Sellmair 0713866c1e [K/N] Modularise :kotlin-native:native.backend to extract objc header generation (2/2)
^KT-63905 Fixed
2023-12-04 18:52:08 +00:00
Artem Olkov a040954f68 rrn/rd/KT-63270-swift-printer
KT-63270: add swift printing capabilities to SIR

Co-authored-by: Artem Olkov <artem.olkov@jetbrains.com>
Co-authored-by: Sergej Jaskiewicz <jaskiewiczs@icloud.com>


Merge-request: KT-MR-13191
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2023-11-29 14:03:59 +00:00
Sergey Bogolepov 58bef34b9c [Swift Export] Rename tests generation tool
Now it generates test-cases for sir-compiler-bridges as well,
so it makes sense to move away from Analysis API in its name.
2023-11-28 18:00:43 +00:00
Sergey Bogolepov fe9ab0a1fc [Swift Export] KT-63516
Add a sir-compiler-bridge module that adds Kotlin and C bridges
for SIR. As SIR is still WIP, the module accepts `BridgeRequest`
instances instead of SIR elements.
2023-11-28 18:00:43 +00:00
Artem Olkov 7c15e3f229 KT-63269: implementation for SIRGenerator with top-level functions
KT-63269: add test generator

Merge-request: KT-MR-12945
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2023-11-28 18:00:43 +00:00
Sergey Bogolepov cc14f11e2a [Swift Export] initial infrastructure for Swift IR
New modules 'sir', 'sir-passes', and 'sir-analysis-api' were added under
'native:swift' for creating and manipulating Swift IR elements.

* `sir` contains the implementation of Swift IR.
* `sir-analysis-api` contains translation from Analysis API to SIR.
* `sir-passses` contains transformation passes.

This groundwork will allow to progress with the Swift IR.
2023-11-28 18:00:43 +00:00
Svyatoslav Kuzmich 910835af2d [Web] Add core/compiler.common.web module
Add WebCommonStandardClassIds object to use in JS&Wasm shared code
2023-11-23 10:42:56 +00:00
Pavel Kirpichenkov 645e4af8b1 [IDE] Move KotlinJavaScriptMetaFileDecompiler to kotlin.git
KTIJ-27752
2023-11-21 18:43:06 +00:00
Pavel Kunyavskiy 649a7bd66b [IR] Moved actualizer and related things to separate module
^KT-62292
2023-11-20 08:31:41 +00:00
Ilya Chernikov 6877fa8e42 Scripting: remove obsolete script-util module
#KT-58367 fixed
2023-11-16 15:46:08 +00:00
Ilya Kirillov 6aeabc83ea [kotlin] fix "IllegalStateException: Could not find stdlib"
The commit removes all the KLib resolution logic,
now Analysis API Standalone clients need to provide all the KLib
list directly.

The resolution logic was removed as too error-prone and requiring compiler configurations.

Kotlin Gradle plugin can provide a full set of required KLibs,
so if a client is a Gradle plugin, this should not be an issue.

Probably, some fancy API which will explicitly perform all KLib dependency searches
should be introduced in the future (KT-63395)

^KT-63126 fixed
2023-11-16 13:31:53 +00:00
Pavel Punegov 9f9b4d1981 [K/N][publish] Publish kotlin-native-compiler-embeddable.jar
Add an ability to publish kotlin-native-compiler-embeddable.jar and
sources to maven. Adds necessary for that sourcesJar and javadocJar
tasks. Note that Native distribution uses this jar without a version postfix.
Also cleaned up the obsolete backend.native publication and renamed 
project to match its name.


Merge-request: KT-MR-12974
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-11-15 14:54:04 +00:00
Ilya Kirillov 5f5daa0e06 [Decompiler] rename :analysis:decompiled:native -> :analysis:decompiled:decompiler-native
to avoid possible name clashes between different
Gradle subprojects with the same name.

see https://github.com/gradle/gradle/issues/16986
2023-11-10 06:41:03 +00:00
Ilya Kirillov bffbbe6293 [LL FIR] add LL FIR tests based on AbstractFirPsiNativeDiagnosticsTest
^KT-62910 fixed
2023-11-10 06:41:03 +00:00
Ilya Kirillov 68235b978b [Analysis] add test generator for Kotlin/Native tests inside Analysis API
This test generator is enabled only if Kotlin/Native support is enabled in the project

^KT-62910
2023-11-10 06:41:03 +00:00
Alexander.Likhachev 0333985445 [Build] Remove kotlin-gradle-plugin-compiler-dependencies
We should consider the information from the removed buildscript to resolve KT-61706
^KT-62650 Fixed
2023-11-09 12:19:23 +00:00
Ilya Kirillov a65c735feb [build] add checks to ensure that no modules which are part of the IDE plugin do not use experimental stdlib API
to ensure binary compatibility with stdlib inside IntelliJ.

This includes using the latest stable kotlin API version and
forbidding using experimental declarations from stdlib.

^KT-62510
2023-10-25 08:38:07 +00:00
Ilya Gorbunov bd6607c860 Drop kotlin-stdlib-wasm project
Its tasks are no longer used as build entry points
2023-10-20 16:27:30 +00:00
Nataliya.Valtman 9de791b9ac Create FUS Gradle plugin
fus-statistics-gradle-plugin can be used by any other Gradle plugins to
collect additional metrics for FUS.

KT-59627
2023-10-18 10:32:11 +00:00
Ilya Gorbunov 469ca237db Remove the previous approach to build wasm stdlib variants 2023-10-17 16:30:41 +00:00
Ilya Kirillov 83db91d445 [build] do not build kotlin-stdlib-minimal-for-test-for-id as it's unused in the IDE 2023-10-13 11:49:55 +00:00
Ilya Kirillov b3226b9b78 [build] do not build kotlin-compiler-for-ide as it's unused in the IDE Plugin 2023-10-13 11:49:55 +00:00
Svyatoslav Kuzmich 881997585a [Wasm] Add K2 checkers.web.common module (KT-56849)
This module is created to share JS and Wasm checker logic

Extract isEffectivelyExternal util fun from K/JS in order to
 reuse it in Wasm checkers
2023-10-12 13:26:58 +00:00
Svyatoslav Kuzmich a10042f909 [Wasm] Add K2 checkers.wasm module (KT-56849)
Add first K2 checker ExternalInheritanceChecker to test the infra
2023-10-12 13:26:58 +00:00
Svyatoslav Kuzmich 1ddcdb95bd [Wasm] Add compiler.common.wasm module
This module is introduced to mirror K/JS code layout
Add WasmStandardClassIds to use in checkers
2023-10-12 13:26:58 +00:00
Ilya Gorbunov eb813b7837 KT-62004 Drop legacy JS build of kotlin-test 2023-10-06 00:46:08 +00:00