Leonid Startsev
a20ce06102
Support @Serializable(ContextualSerializer) on class
...
It was fixed some time ago (https://github.com/Kotlin/kotlinx.serialization/issues/957 )
but for some reason only for old backend.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1776
2022-09-28 12:40:20 +00:00
pyos
72e671c8f1
FIR Parcelize: allow anonymous local objects if they're enum entries
2022-09-28 15:14:25 +03:00
Nicklas Ansman Giertz
b02948b5f7
KAPT: Kapt generates illegal stubs for private interface methods
...
Interface methods that were private got both the `default` and `private`
modifiers when using `jvm-default=all` which is not valid.
The stub will now just contain `private` in this case.
This fixes KT-48013.
2022-09-26 12:21:56 +02:00
Dmitriy Novozhilov
7ce3934cf7
[FIR] Add type resolution service into SerializationFirSupertypesExtension
...
This service allows resolve custom user types from plugins, which allows
to support specifying type arguments of generated supertypes basing
on arguments passed to annotations
2022-09-26 10:09:09 +00:00
Sergey.Shanshin
9210108d5a
Added test on Serializable(with=...) in K2
2022-09-23 11:56:19 +00:00
Nikolay Krasko
1630386712
Move to JDK_X_Y variables
2022-09-21 22:53:19 +00:00
Ilya Goncharov
d203dc35bf
[JS IR] Add to IR keep possibility similar to legacy-dce one
...
It helps to:
- keep declarations even if they are not reachable and not exported
- not minify names of not exported declarations
Compiler argument: -Xir-keep=A,B
Can be used for top-level declarations or for member
^KT-54118 fixed
2022-09-20 16:06:17 +00:00
Dmitriy Novozhilov
367761008b
[Lombok] Make FQNs of Guava collections shade-safe
...
^KT-53683
2022-09-20 11:08:30 +03:00
Dmitriy Novozhilov
b1d42e1383
[Lombok] Update incorrect testdata according to KT-53965
2022-09-20 10:38:00 +03:00
Dmitriy Novozhilov
111dab7a88
[Lombok] Fix test configuration
2022-09-20 10:37:59 +03:00
Leonid Startsev
c8647841dc
Added documentation for MagicApiIntrinsics.voidMagicApiCall
...
Remove mavenLocal() from repos
2022-09-16 14:34:30 +00:00
Leonid Startsev
69c00785f2
Support plugin-defined instrinsics that can be non-typeOf operation types.
2022-09-16 14:34:30 +00:00
Leonid Startsev
033538161e
Determine more precise conditions when to enable serialization intrinsic
...
Disable it if we do not have required `noCompiledSerializer` function in
runtime. Leave it enabled in tests.
Rollback some changes for old backend as it is unsupported now.
2022-09-16 14:34:30 +00:00
Leonid Startsev
637e8c7d8a
Provide feature-flag to disable intrinsics in serialization plugin
2022-09-16 14:34:29 +00:00
Leonid Startsev
ad2adadb36
Remove OperationType.PLUGIN_DEFINED type:
...
instead, plugins should emit the code similar to the TYPE_OF one with
a special call to MagicApiIntrinsics.voidMagicApiCall directly afterwards.
This is required because old compiler need to correctly inline code
rewritten by plugin.
2022-09-16 14:34:29 +00:00
Leonid Startsev
763303fe97
Refactor extensions for plugin intrinsics entry points
...
so platform-specific parts won't have unsafe downcasts.
2022-09-16 14:34:29 +00:00
Leonid Startsev
eae588abea
Improve line numbers handling in serialization intrinsic
...
Fix nullable serializers on top-level & method with incorrect receiver
Improve handling of different runtime versions
2022-09-16 14:34:29 +00:00
Leonid Startsev
aac9a06474
Also support intrinsification for SerializersModule.serializer<T>()
...
method that fallbacks to module.getContextual().
2022-09-16 14:34:28 +00:00
Leonid Startsev
a59f5f407b
Introduce support for plugin-defined intrinsics in JVM IR backend:
...
Add intrinsic for kotlinx.serialization.serializer<T>() function.
Plugin intrinsic for old backend is removed because it is too hard
and unjustifiable to unify them.
2022-09-16 14:34:28 +00:00
Leonid Startsev
f9edbd825a
Introduce support for plugin-defined intrinsics in old JVM backend:
...
(Old is created first because all intrinsics emit bytecode anyway)
Provide intrinsic for serializer<T>() function so it won't
invoke typeOf() construction and KType->KSerializer conversion
making it fast and truly reflectionless
Add support for recalculating stack size in plugin-defined intrinsics
since it is needed for correct work:
Unify method for recalculating stack size with existing typeOf intrinsic
Add testdata for IR for future intrinsic in IR
2022-09-16 14:34:28 +00:00
Mads Ager
294395f4cc
Rebase bytecode text expectations for parcel part of android-extensions.
2022-09-16 15:03:01 +02:00
Mads Ager
2d720a09c3
Add layout lib system properties so that parcel tests run.
...
This is for the parcel part of deprecated android extensions.
So this will be removed soon, but it is still there and the
tests should run.
2022-09-16 15:03:01 +02:00
Mads Ager
ff84c19eff
Make kotlin-android-extensions always cause a compilation error.
...
kotlin-android-extensions are deprecated and have been scheduled
for removal in 1.8.0.
https://android-developers.googleblog.com/2022/02/discontinuing-kotlin-synthetics-for-views.html
2022-09-16 15:03:01 +02:00
Dmitriy Novozhilov
ed1a1c067c
[Assign plugin] Add experimentality warning
2022-09-16 10:12:41 +03:00
Anže Sodja
09d6dfc8bf
[Assign plugin] Add a compiler plugin for overloading assign ('=') operator
2022-09-16 10:12:41 +03:00
Alexander Udalov
0569f429dd
Report error on -Xuse-old-backend, remove Gradle option useOldBackend
...
Allow using old JVM backend only to compile kts.
#KT-48532 Fixed
2022-09-16 00:16:31 +02:00
Alexander Udalov
97f63d539c
Remove tests on jvm-abi-gen with old JVM backend
...
#KT-48532 Fixed
2022-09-16 00:16:31 +02:00
Dmitriy Novozhilov
efc443e7ef
[NoArg] Add test for KT-53122
2022-09-15 17:27:19 +03:00
Dmitriy Dolovov
e4556ecc0d
[IR] User-friendly message about unexpected unlinked symbols
...
^KT-53649
2022-09-13 17:12:13 +00:00
Dmitriy Novozhilov
a78d43c1ec
[Lombok] Support RawTypes in fields wtih @Singular in K2 version
...
^KT-53657 Fixed
2022-09-12 11:29:17 +00:00
Dmitriy Novozhilov
06119a4670
[Lombok] Fix support of Iterable field marked with @Singular
...
^KT-53647 Fixed
2022-09-12 11:29:17 +00:00
Dmitriy Novozhilov
4ab79ed97d
[Lombok] Fix behavior of ignoreNullCollections parameter of @Singular
...
^KT-53724 Fixed
^KT-53721 Fixed
2022-09-12 11:29:16 +00:00
Dmitriy Novozhilov
2aadaee69f
[Lombok] Properly support Guava collections with @Singular
...
^KT-53683 Fixed
2022-09-12 11:29:16 +00:00
Leonid Startsev
62f67e46fd
Add SerializerFactory supertype for Native & JS in FIR serialization plugin.
...
This supertype is intended to be used with @AssociatedObject on platforms
where reflection possibilities are limited.
2022-09-12 10:19:39 +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
Alexander Udalov
e83819e682
Minor, remove obsolete directives from jvm-abi-gen tests
...
Language version 1.6 was needed in these tests to enable annotation
instantiation, but that feature is now enabled by default.
2022-09-09 14:32:36 +02:00
Alexander Udalov
6e1cddd039
Disable @SourceDebugExtension generation in jvm-abi-gen tests
...
In these two tests, contents of the annotation differ by design, and
that does not constitute a difference in ABI.
2022-09-09 14:32:35 +02:00
Alexander Udalov
7dad47cd76
Add -X argument to disable generation of @SourceDebugExtension
...
This will be used in tests in the subsequent commit.
2022-09-09 14:32:35 +02:00
Dmitriy Novozhilov
671083c701
[Serialization] Implement serialization checker for K2 version of plugin
...
^KT-53178 Fixed
2022-09-07 07:57:38 +00:00
Dmitriy Novozhilov
194741b96b
[FIR] Remove incorrect FirClassSymbol<*>.superConeTypes utility
...
Replace all usages with member `FirClassSymbol.resolvedSuperTypes`
2022-09-07 07:57:37 +00:00
Dmitriy Novozhilov
a6d3c6e5c6
[Serialization] Suppress OPT_IN errors in all diagnostic tests
2022-09-05 10:20:06 +00:00
Dmitriy Novozhilov
84b8ab1f9c
[Serialization] Add DiagnosticsTests for FIR
2022-09-05 10:20:06 +00:00
Dmitriy Novozhilov
a2ffba275c
[Serialization] Migrate all tests to new test infrastructure
2022-09-05 10:20:05 +00:00
Ilya Muradyan
b801d963a1
[Scripting] Fix obtaining virtual file for getting compilation configuration
2022-08-31 20:51:06 +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
Pavel Mikhailovskii
18e61315f4
KT-27936 Generate InnerClasses attributes
2022-08-23 22:06:10 +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
Dmitriy Novozhilov
cc00dcc038
[Serialization] Reorganize module structure
2022-08-22 17:23:18 +03:00
Nikita Bobko
2a4f3f41aa
2/5 Replace source dependency on kotlin-reflect with binary dependency
...
Review: https://jetbrains.team/p/kt/reviews/6753
Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.
Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Nikita Bobko
0874fb71c6
Replace all kotlin-reflect-api dependencies with kotlin-reflect
...
Review: https://jetbrains.team/p/kt/reviews/6753
Why: I'm going to replace source dependency on kotlin-reflect with
binary dependency. Normalize reflect dependency before global
processing.
2022-08-22 15:43:11 +02:00