Commit Graph

65 Commits

Author SHA1 Message Date
Alexander.Likhachev a19bd2ed2e [Build] Migrate most of the build logic from Project.buildDir usage
It's going to be deprecated in Gradle 8.3

There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Ilya Goncharov 08e3cb300a [JS] Migrate tests onto IR compiler with outputDir API instead of outputFile
^KT-61117 fixed
2023-11-29 11:21:56 +00:00
Pavel Kunyavskiy faaefbd8e7 [IR] Move .parents and .parentsWithSelf to IR utils
^KT-62292
2023-11-20 08:31:41 +00:00
Iaroslav Postovalov a3b55cf758 [IR] Drastically simplify the hierarchy of IR origins
IrStatementOriginImpl and IrDeclarationOriginImpl were made final
classes to simplify the creation of them (a delegate provider was
added) and to optimize performance when comparing the origins by type
and name
2023-11-13 17:56:09 +00:00
Leonid Startsev 4fa121071a Update kotlinx-serialization dependency for serialization compiler plugin tests.
Properly set up dom-api-compat dependency for JS IR tests. Since this dependency is added
automatically for every Kotlin/JS library, it should be present during tests just as stdlib.

As a result, tests for serializable enums were changed since 1.6.0 runtime does not require enums to be explicitly serializable.
2023-11-10 14:14:04 +00:00
Dmitriy Novozhilov fb8bf19091 [IR] Rename IrSymbolInternals to UnsafeDuringIrConstructionAPI
The new name more precisely describes the meaning of this opt-int
2023-10-25 11:32:46 +00:00
vladislav.grechko 29eb1c7a63 Do not add nullability annotations to the methods of anonymous classes
Nullability annotations are useless for the methods of anonymous classes
due to their restricted scope.

^KT-62044: Fixed
2023-10-10 10:34:33 +00:00
Vladimir Sukharev 690d18e541 [K/N, Test] Move test code "org.jetbrains.kotlin.konan" -> "org.jetbrains.kotlin.konan.test.*" 2023-09-22 17:27:09 +00:00
Alexander.Likhachev 6eaccc997f [Build] Fix the typo junit jupyter -> jupiter 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 6f96be0b76 [Build] Get rid of the testApiJUnit5 method
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 53fde520d5 [Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
mvicsokolova 8f4136f145 [atomicfu] Added a check that atomic properties are declared as final values.
Fixes: https://github.com/Kotlin/kotlinx-atomicfu/issues/237

YT: KT-61550


Merge-request: KT-MR-11886
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-29 12:15:56 +00:00
mvicsokolova 76a1091820 [K/N]: Do not require JDK11 for :native:native.tests
This commit provides a small fix in the code of a native test runner so that JDK11 is not required and removes the JDK11 target for the atomicfu-compiler-plugin.

Fixes KT-61293

Merge-request: KT-MR-11757
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-22 13:32:38 +00:00
Dmitriy Novozhilov 697d0d5638 [IR] Mark IrSymbol.owner with OptIn annotation
^KT-60923 Fixed
2023-08-16 17:47:29 +00:00
mvicsokolova 9ff0e0b046 [atomicfu-K/N] Tests for K/N atomicfu-compiler-plugin
* `nativeTest` task now allows to provide compiler plugins that may be enabled during test compilation
* test sets for JVM and K/N backends are equal

KT-60800 describes all the issues with native tests that were solved in this commit.

Co-authored-by: Dmitriy Dolovov <Dmitriy.Dolovov@jetbrains.com>

Merge-request: KT-MR-11401
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-16 09:41:29 +00:00
Aleksei.Cherepanov 7a97a43036 Fix JPS import after bed16f92 (KT-58358)
Some native test dependencies were excluded from JPS import of `:kotlin-atomicfu-compiler-pligin`


Merge-request: KT-MR-11477
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-08-07 15:06:01 +00:00
mvicsokolova bed16f92b1 [atomicfu-K/N]: Support Native backend in atomicfu compiler plugin
Atomicfu compiler plugin supported transformations for K/N:
* atomic properties are replaced with volatile properties and all the operations are delegated to native atomic intrinsics
* atomic arrays are replaced with kotlin.concurrent.Atomic*Arrays
* all other features available on JVM are covered as well (custom atomic extensions, delegated properties, debug tracing)

See (KT-58358, https://github.com/Kotlin/kotlinx-atomicfu/issues/261)

Merge-request: KT-MR-11253
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-31 14:48:28 +00:00
mvicsokolova b6f8991072 [atomicfu-JVM]: Commonization of K/N and JVM (part 2)
The following transformations were commonized:

* generation of the transformed atomic extension signature
* building atomic array fields (arrays are now supported on both backends JVM and K/N)
* transformation of function calls on atomic array elements
* Generation and invocation of atomic extensions (the only difference is generation of synthetic value parameters)
* Changed synthetic parameters passed to the generated atomic extensions

See, KT-60528

Merge-request: KT-MR-11249
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-28 11:45:10 +00:00
mvicsokolova 5c5367d377 [atomicfu-JVM] Preparation for commonization of JVM and K/N transformers
The following updates in the JVM/IR plugin were made:
* Lots of refactoring with preparation for K/N support: commonization of transformations.
* Improved error handling (checks for visibility constraints, appending message about usage constraints in case of an error).
* Explicit requirements for the visibility of atomic properties: to prevent leaking they should be private/internal or be members of private/internal classes.
* Fixed visibility of generated properties: volatile properties are always private and atomic updaters have the same visibility as the original atomic property.
* Volatile fields are generated from scratch and original atomic properties are removed.
* Delegated properties support is fixed (only declaration in the same scope is allowed).
* Non-inline atomic extensions are forbidden.
* For top-level atomics: only one wrapper class per file (with corresponding visibility) is generated.
* Bug fixes.

The corresponding tickets: 
https://github.com/Kotlin/kotlinx-atomicfu/issues/322
KT-60528



Merge-request: KT-MR-10579
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-20 13:59:23 +00:00
Bogdan Mukvich 3de59e3f17 Fix kotlinx-atomicfu-runtime sonatype publication
^KT-56400
2023-05-12 12:54:52 +00:00
mvicsokolova 0d7625a262 Atomicfu-runtime: changed kotlin.js.compiler option to IR
Fixes KT-56400

Merge-request: KT-MR-10103
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-05-11 18:12:24 +00:00
Yahor Berdnikau 64f8b87b66 Publish atomicfu compiler plugin separately
- rename plugin into 'kotlin-atomicfu-compiler-plugin'
- add 'kotlin-atomicfu-compiler-plugin-embeddable' to be used with
  'kotlin-comiler-embeddable'

^KT-52811 In Progress
2023-04-17 14:40:49 +00:00
Artem Kobzar f0aa6c6d32 [K/JS Gradle] Remove forceLegacyBackendUsage from KotlinGradlePlugin previously added with the compiler flags refactoring, also fix bootstrap compilation of atomicfu plugin 2023-04-12 14:04:34 +00:00
Alexander Udalov 562b27db4e JVM IR: initialize enum entries without invokedynamic
#KT-57316 Fixed
2023-03-24 13:38:32 +00:00
Artem Kobzar 7a79de6d16 [K/JS] Move JS IR box tests setup into separated function 2023-03-19 22:53:05 +00:00
Vyacheslav Gerasimov 499ab48d30 Revert "[Build] Fix compilation of kotlinx-atomicfu-runtime in 1.9.0"
This reverts commit 4ab39b908e.
2023-03-03 15:06:23 +00:00
Dmitriy Novozhilov 4ab39b908e [Build] Fix compilation of kotlinx-atomicfu-runtime in 1.9.0
^KT-56400
2023-02-18 13:26:53 +00:00
Pavel Mikhailovskii 4c7f8ba196 KT-56457 Annotate Enum.entries with @NotNull 2023-02-09 20:13:56 +00:00
Valeriy.Vyrva 9a0e2b08f1 Bump JUnit5 version to 5.9.1 2023-02-06 10:01:52 +00:00
mvicsokolova bc612fa1c6 Atomicfu-plugin (JVM IR): fix visibility of wrapper classes generated for static atomics.
Fixes https://github.com/Kotlin/kotlinx-atomicfu/issues/272
2023-02-02 16:37:06 +00:00
Dmitriy Novozhilov 88efa6bfb6 Update tests after switching to LV 1.9 2023-01-30 09:29:57 +00:00
Ilya Goncharov d7c31f79a8 Do not suppress NPM related tasks, but be aware about checking of them in task graph 2023-01-19 13:43:57 +00:00
Alexander Udalov 3c4b5529af Update year to 2023 in COPYRIGHT_HEADER.txt
This commit is the result of changing the year to 2023 in
COPYRIGHT_HEADER.txt and running all `generate*` tasks in
`generators/build.gradle.kts`.
2023-01-02 22:52:15 +01:00
Dmitriy Novozhilov fe81ad0bbe [Build] Fix configuration cache issues of miscCompilerTests 2022-12-01 07:29:40 +00:00
Jaebaek Seo 1a5a6474d6 Support TargetPlatform.isJs() for FIR 2022-11-15 16:50:17 +01:00
mvicsokolova 9bd17f628d Atomicfu-compiler plugin: update test text files. 2022-11-13 21:58:25 +00:00
mvicsokolova 5708b2229a Atomicfu plugin (JS IR): fix for private delegated properties
Fixes https://github.com/Kotlin/kotlinx-atomicfu/issues/260
2022-11-13 21:58:25 +00:00
mvicsokolova 6a4e9f1d0f Atomicfu JVM IR: fixed visibility modifiers of generated declarations, should be private.
Fix for: https://github.com/Kotlin/kotlinx-atomicfu/issues/258
2022-10-26 12:59:25 +00:00
mvicsokolova cb23dbb492 atomicfu-compiler-plugin: support declaration of properties in objects for JVM IR
Fix: https://github.com/Kotlin/kotlinx-atomicfu/issues/241
Merge-request: KT-MR-6871
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2022-10-07 17:10:41 +00:00
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Nikolay Krasko 01f567a16d Disable yarn and npm tasks from the build when tests are not active
Kotlin build shouldn't depend on npm during while deploy artefacts tasks

^KTI-887 Fixed
^KT-53687 Related
2022-08-30 22:15:16 +00:00
soarex 4a8eec8166 Fix test environment setup in atomicfu plugin
Co-authored-by: soarex <soarex16@gmail.com>

Merge-request: KT-MR-6915
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2022-08-23 20:58:31 +00:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Leonid Startsev b0716fe725 Adapt IR serialization plugin so it works both with FIR and old FE
(except some places that are not currently supported by FIR part of plugin)
2022-08-17 11:43:36 +00:00
Leonid Startsev 467ff30aac Support full pipeline for basic kotlinx.serialization case:
FIR frontend and IR backend plugins.

Note: IR plugin is now broken for old FE, fixed in subsequent commits
2022-08-17 11:43:34 +00:00
Dmitry Gridin 4ceb170917 regenerate tests 2022-08-05 14:12:41 +02:00
Yahor Berdnikau b28819a186 Enable signing for publication into Gradle plugin portal
^KT-53172 Fixed
2022-07-21 11:52:46 +02:00
mvicsokolova 6c6717da5a Revert renaming the kotlinx-atomicfu-runtime module 2022-07-07 00:37:06 +02:00
Dmitriy Novozhilov 1a8496757e [Compiler] Mark all entrypoints to compiler API as experimental 2022-06-29 12:00:01 +00:00