Vyacheslav Gerasimov
bc2f0936bd
Build: Rename commonDep -> commonDependency
2021-12-16 21:48:19 +03:00
Leonid Startsev
4df34a20e7
Fix classSerializerAsObject test that got broken after conflict-merge
...
with b131c52889
2021-12-15 17:18:18 +03:00
Leonid Startsev
9b9522d714
Allow defining custom KSerializer for non-generic class as a class
...
Previously only objects were allowed. Due to a bug, this accidentally
worked in old backend.
#KT-46444 Fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1587
2021-12-14 17:53:09 +00:00
Ivan Kylchik
b131c52889
Drop all usages of WITH_RUNTIME directive
2021-12-13 18:07:11 +03:00
Mikhael Bogdanov
c599b58eb3
Remove obsolete options
2021-12-08 12:25:02 +01:00
Mikhael Bogdanov
0997207c7c
Apply -Xjvm-default for specific modules only
2021-12-03 06:39:38 +01:00
Anastasiya Shadrina
3de1566f11
[Compiler plugins] Fix usage of descriptor API
2021-12-02 20:23:41 +03:00
Anastasiya Shadrina
a39fbd3822
[FE] Add getContextReceivers to CallableDescriptor interface
2021-12-02 20:23:17 +03:00
Leonid Startsev
de128a5406
kotlinx.serialization: Support @Serializable on sealed interfaces.
...
Interfaces (regular and sealed) are by default polymorphic. To benefit
from sealing (i.e. knowledge of all inheritors in compile-time), @Serializable
annotation may be added on sealed interface, generating the same serializer
that can be used for sealed classes.
Synthetic nested classes are not generated in DEFAULT_IMPLS mode because
it causes problems when adding a synthetic companion to an interface.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1576
2021-12-01 14:14:47 +00:00
Ivan Kylchik
c7435ba760
Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
...
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Steven Schäfer
ca74b7becc
AsmLikeInstructionListingTest: Handle remaining instructions
...
Adds argument printing for TypeInsnNode, IincInsnNode,
MultiANewArrayInsnNode, InvokeDynamicInsnNode,
TableSwitchInsnNode, and LookupSwitchInsnNode.
2021-10-26 16:50:12 +02:00
Ivan Kylchik
225b064470
Implement new 'mix' test mode
...
This mode must be used when one configuration will run several tests
for different JUnit versions.
2021-10-25 00:14:20 +03:00
Dmitriy Novozhilov
e56c87a17a
[Build] Move utils for generation JUnit 5 tests to :generators module
2021-10-12 17:26:18 +03:00
Dmitriy Novozhilov
a68c4ec7be
[Test] Add ability to specify main class in Box tests
...
Also slightly refactor some existing services to make them more idiomatic
2021-10-07 13:08:45 +03:00
Dmitriy Novozhilov
aab8870903
[Test] Migrate AbstractAsmLikeInstructionListingTest to new test infrastructure
2021-10-07 13:08:44 +03:00
Leonid Startsev
f4eaf611c8
Do not access serializable property IrField if it is unbound
...
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1698
2021-09-29 15:21:12 +00:00
Vyacheslav Gerasimov
ab146bd6d4
Build: Fix deprecated Gradle configurations usages
...
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Steven Schäfer
ae27be16eb
AsmLikeInstructionListingTest: Print owner for FieldInsnNode
2021-09-18 00:25:58 +02:00
Dmitriy Novozhilov
5c2a3bb78e
[FIR] Move duplicating names and classIds to StandardClassIds
2021-09-15 17:11:29 +03:00
Mikhail Glukhikh
3febabe977
Use OPT_IN instead of EXPERIMENTAL in diagnostic names
2021-09-10 16:29:13 +03:00
Ivan Kochurkin
2baed77598
[FIR] Add JVM_SYNTHETIC_ON_DELEGATE diagnostic
...
Extract JVM names to common JvmNames
2021-09-10 00:49:03 +03:00
Nikolay Lunyak
c2e5583780
[FIR] Add support for JVM_STATIC_NOT_IN_OBJECT_OR_COMPANION diagnostic
2021-09-09 20:18:49 +03:00
Dmitriy Novozhilov
0260bf8767
[FE] Move diagnostic parameter renderers to common module
2021-09-09 17:20:20 +03:00
Mikhail Glukhikh
ed035d99ab
Migrate -Xopt-in to -opt-in in Gradle Kotlin scripts
2021-09-03 15:40:47 +03:00
Sergey.Shanshin
36484abb50
Fix call of serializer for parametrized sealed and abstract classes
...
Fixes Kotlin/kotlinx.serialization#1646
2021-09-03 06:03:39 +00:00
Leonid Startsev
3102e9f614
Support properties from other modules in 'declaresDefaultValue'
...
Add box test using new test infra
Move serialization tests to misc compiler tests
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1602
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1481
2021-08-31 20:36:25 +00:00
Steven Schäfer
de9d2919a8
JVM Metadata: Add a bit to mark anonymous objects in inline functions
...
Anonymous objects in the scope of an inline functions are copied to
all call-sites. This makes them part of the public ABI of a Kotlin
library.
We introduce a flag to mark all classes in the scope of an inline
function. When compiling with assertions enabled, we check that
this flag is set whenever we inline an anonymous object from another
module.
2021-08-23 18:25:33 +02:00
Sergey Shanshin
b42d6a3e85
Fix creating of lazy delegated property in kotlinx.serialization
...
Fixes Kotlin/kotlinx.serialization#1616
2021-08-02 16:27:03 +00:00
Leonid Startsev
4bc521249b
kotlinx.serialization: Support InheritableSerialInfo
2021-07-21 10:06:12 +00:00
Nikita Bobko
39fa2b0baf
Delete Kotlin IntelliJ IDEA plugin sources
...
Kotlin plugin sources were migrated to intellij-community:
https://github.com/JetBrains/intellij-community/tree/master/plugins/kotlin
Preserve `jps-plugin/testData/incremental`
because it's used in `compiler/incremental-compilation-impl/test`
Preserve `idea/testData/multiModuleHighlighting/multiplatform`
because it's used in `MppHighlightingTestDataWithGradleIT`
2021-07-21 11:23:43 +02:00
Ilya Chernikov
56805dded8
[minor] IR: minor builtins infrastructure fixes
2021-07-16 02:24:40 +03:00
Ilya Chernikov
dee0487185
IR: Refactor IrBuiltIns to abstract it from descriptors
2021-07-16 02:24:18 +03:00
Sergey Shanshin
0d211a53cb
Support serializable classes clash with JVM primitive types by name
...
Fixes Kotlin/kotlinx.serialization#1353
2021-07-06 12:52:53 +03:00
Nikolay Krasko
48a4d7d418
Build: drop maven publication for Kotlin plugin artifacts
2021-06-09 17:43:54 +03:00
Leonid Startsev
dd21326425
Create a copy of incorrectly deserialized parent's writeSelf function
...
To avoid problems during code generation when INVOKEDYNAMIC
is used instead of static
#KT-47161 Fixed
2021-06-08 11:53:47 +00:00
Mikhail Glukhikh
0a670bf055
Report EXPERIMENTAL_API diagnostics on various implicit usages
...
#KT-32443 Fixed
#KT-22852 Fixed
2021-06-08 11:37:28 +03:00
Sergey Shanshin
71c9e62d64
Added support serialization of local classes in IR backend
...
Resolves Kotlin/kotlinx.serialization#1427
2021-06-02 16:43:31 +00:00
Leonid Startsev
1f837134bb
Support for @EncodeDefault annotation
2021-06-02 13:43:39 +00:00
Leonid Startsev
b43e5a5e7d
fixup! Fix tests and review notes
2021-06-01 16:41:56 +00:00
Leonid Startsev
6a5cf00d7a
Optimize serializer instantiation: use Companion.serializer() when possible
...
Add test for sealed hierarchy
2021-06-01 16:41:55 +00:00
Leonid Startsev
b61277df97
Support annotations in constructor signatures of special serializers
2021-06-01 16:41:55 +00:00
Leonid Startsev
229085f3d1
Support default parameter values in @SerialInfo annotations
...
#KT-46739 Fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1461
2021-06-01 16:41:54 +00:00
Sergey Shanshin
961ee92c15
Fix bytecode for serializable enums in generated tests
2021-05-27 15:35:12 +03:00
Sergey Shanshin
16dbafced1
Add .serializer() to enum companion and object with custom serializer
...
Fixes Kotlin/kotlinx.serialization#1386
2021-05-26 16:07:59 +03:00
Dmitriy Novozhilov
d114913cd2
Replace usages of addToStdlib.firstNotNullResult with firstNotNullOfOrNull
2021-05-14 14:30:19 +03:00
Leonid Startsev
d60a8f9baa
Use correct type in KClassReference
...
Make sure that writeSelf function remains static
2021-05-06 19:53:21 +00:00
Leonid Startsev
a58f29aa06
Remove unnecessary ignoreIndexTo outside writeSelf
...
It never worked: descriptor.declaresDefaultValue used by property.isOptional
works only for current module
(since it looks up psi), so we never access default value initializers
outside current module
2021-05-06 19:53:21 +00:00
Leonid Startsev
66f39ca185
Use SerializerFactory interface and generate function
...
for sealed and abstract serializable classes.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1116
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1078
2021-05-06 19:53:20 +00:00
Sergey Shanshin
8dd307573a
Fix IR compilation of external serializers in native
2021-04-30 18:17:08 +03:00
Andrey Zinovyev
e4a5775570
Remove duplicated code in annotation-based-compiler-plugins-ide-support
2021-04-29 23:14:16 +03:00