Commit Graph

46 Commits

Author SHA1 Message Date
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
Dmitriy Novozhilov 8b42638afa [Plugins] Introduce new API for registering compiler plugins
Original `ComponentRegistrar` exposes Project to its registration method,
  so plugins should manually register extensions to it. To prepare for
  possible unbound compiler from Project API in future new  `K2ComponentRegistrar`
  introduced which provides registration method without Project at all
2022-06-29 11:59:58 +00:00
mvicsokolova 8053746ae0 kotlinx.atomicfu JVM/IR compiler plugin support
Merge-request: KT-MR-6541
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2022-06-26 07:17:06 +00:00
mvicsokolova d015b2b899 Publish kotlinx-atomicfu-runtime module
Merge-request: KT-MR-6516
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2022-06-23 14:56:57 +00:00
Yahor Berdnikau b6edf9a86e Shadow Gradle plugin 3rd party dependencies
Such dependencies will be embedded into plugin jar and their package
will be relocated. This is need to avoid dependency conflicts with
user build scripts dependencies or other Gradle plugins.

Kotlin project dependencies are not shadowed.

^KT-46034 Fixed
2022-06-15 10:57:56 +02:00
Dmitriy Novozhilov 0f757c300a [Atomicfu] Make Atomicfu compatible with K2
Atomicfu is backend-only plugin, so it compatible with both frontends
2022-06-07 14:12:15 +00:00
Zalim Bashorov 64bcd8c91e [JS, atomicfu] Stop applying unused node plugin 2022-04-23 14:06:24 +02:00
Alexander Likhachev 899964ba30 [Build] Update gradle-node-plugin to 3.2.1
#KT-44611 In Progress
2022-04-19 00:39:21 +03:00
Dmitriy Novozhilov afad6a564a [Test] Pass CompilerConfiguration to AbstractEnvironmentConfigurator.registerCompilerExtensions
This is needed to provide ability to configure extensions depending on
  configuration of specific test
2022-04-08 09:42:00 +00:00
Roman Golyshev ffcbc583d0 FIR: Split EnvironmentConfigurator to an interface and abstract class
It is needed to make it easier to write wrappers for configurators
2022-02-25 23:08:26 +03:00
mvicsokolova 5c3ce66e99 kotlinx.atomicfu compiler plugin (JS): delegated properties supported (#4692)
* kotlinx.atomicfu compiler plugin (JS): delegated properties supported

* NPE handling fixed

* Scoped delegated properties supported
2021-12-29 18:16:07 +03:00
mvicsokolova 188d073cc3 kotlinx.atomicfu compiler plugin (JS): tracing supported. (#4691)
* kotlinx.atomicfu compiler plugin (JS): tracing supported.

* Erasing trace invocations from both IrBlock and IrBlockBody.
2021-12-27 23:20:08 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
mvicsokolova ff3abf9fc0 Set JS environments for kotlinx-atomicfu-runtime module (#4680) 2021-12-12 22:53:42 +03:00
mvicsokolova 93561a1a55 kotlinx.atomicfu compiler plugin for JS_IR backend (#4581)
* kotlinx.atomicfu compiler plugin for JS_IR

Support transformations of atomic operations introduced by the kotlinx.atomicfu library for the JS_IR backend. Compiler plugin is applied externally by the kotlinx.atomicfu gradle plugin.

* Apply compiler plugin for JS platform only

* New plugin test structure

* testGroupOutputDirPrefix changed
2021-12-01 22:33:13 +03:00