Dmitry Petrov
e4f9314f94
Use ISE instead of NPE in serialization
2019-08-14 11:16:11 +03:00
Georgy Bronnikov
310237a8b1
Correct expected test output
2019-08-09 13:09:49 +03:00
Vyacheslav Gerasimov
3b78ef9cb2
as36: Add bunches for AS 3.6 C6 based on 192 platform
2019-07-25 20:50:02 +03:00
Leonid Startsev
9c8905ccb6
Patch serializable class with addtional annotation
...
(which contains actual serializer) to make use of it with @AssociatedObjectKey
2019-07-25 14:07:22 +03:00
Leonid Startsev
3896992b12
Fixes for IR serialization plugin
...
- Do not insert typeParameters into IrConstructor;
- Set correct property symbol to IrField;
- Use upper bound as a class descriptor for type parameters.
This will allow to get upper bound's KClass in polymorphic serialization.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/490 ;
- Lazily add all serializer functions.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/502 ;
- Don't generate constructor invocation for abstract(sealed) classes deserializer.
Such code is incorrect anyway (you can't create an instance of abstract class) and causes problems in devirtualization when exporting Native libraries.
2019-07-25 14:07:24 +03:00
Leonid Startsev
6494227c64
Change order in SerializableProperties initialization logic
...
in that way so binding context would be checked only after resolve is triggered (via .getContributed descriptors).
Empty binding context led to some subtle bugs.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/508
2019-07-25 14:07:22 +03:00
Leonid Startsev
822b4556e3
Rewrite IDE check whether serialization plugin is enabled
...
In a such way so it wouldn't check for actual JAR file and wouldn't touch filesystem.
Fixes KT-32346
2019-07-25 14:07:22 +03:00
Leonid Startsev
4379780ff8
Fixed extra argument in function call after rebase
2019-07-05 18:48:51 +03:00
Leonid Startsev
80ddac64e0
Add serializers for primitive arrays to default types list
2019-07-05 18:14:34 +03:00
Leonid Startsev
7ef9fb5511
Export deserialization constructor from JS module
...
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/443
2019-07-01 14:56:10 +03:00
Vyacheslav Gerasimov
db3b01d2d4
Build: Centralize compiler dist build logic in :kotlin-compiler project
2019-06-27 17:56:48 +03:00
Leonid Startsev
a3218da1c3
Add IDE diagnostic on @Serializable classes for non-applied serialization plugin
2019-06-27 15:55:38 +03:00
Nikolay Krasko
beb1bc09d4
Update to 192.5118.30
2019-06-25 11:48:59 +03:00
Vyacheslav Gerasimov
e32bbcecc2
Build: Fix test runtime for kotlinx-serialization-compiler-plugin tests
2019-06-14 18:18:08 +03:00
Vyacheslav Gerasimov
5a39c637c2
Build: Fix intellij dependency leak from ir tree module
2019-06-13 21:03:55 +03:00
Leonid Startsev
b78d84c120
Add some tests for kotlinx.serialization plugin:
...
- declaration checker
- bytecode listings
- JVM IR
Improve @Transient redundant reporting
2019-06-11 19:32:40 +03:00
Leonid Startsev
414c116d93
Fix too strict serializer lookup for generic type parameters
2019-06-10 16:49:19 +03:00
Leonid Startsev
3792c44378
Make short path for non-serializable classes and other improvements:
...
Adjust some error messages
Add 'fallbackElement' to report on when property is implicitly typed
Split findTypeSerializerOrContext into checked and unchecked versions
2019-06-05 19:13:03 +03:00
Leonid Startsev
dc79b99dd2
Implement inspection about no-arg constructor in non-serializable supertype
2019-06-05 19:11:18 +03:00
Leonid Startsev
8f77b55ada
Retrieve serializable properties from binding context in most of the places
...
Remove unused record 'SERIALIZER_FOR_PROPERTY'
2019-06-05 19:11:18 +03:00
Leonid Startsev
fe1f36bc02
Report an error on @Serializable inline classes and missing @Transient initializers
2019-06-05 19:12:34 +03:00
Leonid Startsev
e6d96f1de9
Implement diagnostic about nullable serializer for non-nullable type
2019-06-05 19:12:00 +03:00
Leonid Startsev
6895184b84
Implement basics diagnostics reporting from the serialization plugin similarly to noArg and allOpen plugins
2019-06-05 19:11:20 +03:00
Leonid Startsev
d3a596e3c2
Correctly copy init blocks code to deserialization constructor
...
Fixes https://github.com/JetBrains/kotlin-native/issues/3019
Workaround problem with proguard and inline reified functions
2019-06-05 17:44:34 +03:00
Leonid Startsev
6370f0b3be
Correctly reference deserialization constructor added by plugin
...
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/472
2019-06-05 17:43:46 +03:00
Leonid Startsev
b5c4f3ecc8
Coerce property value from correct type after retrieving it
...
#KT-25497 fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/434
2019-05-23 14:21:09 +03:00
Leonid Startsev
9ce1f843e3
Remove non-type annotations from type serializer analysis
...
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/450
2019-05-23 14:21:09 +03:00
Leonid Startsev
0ecf20bd62
Revert back visibility in deserialization ctor to public so inheritors can access it from other modules.
...
Fix instantiating of polymorphic serializer with generics.
Move context creation below as asked.
2019-04-30 17:53:40 +03:00
Dmitry Petrov
b78d1bb2b9
IrConstructorCall support in JVM_IR, JS_IR, and FIR2IR
2019-04-26 17:43:25 +03:00
Leonid Startsev
90bf36ea7a
Fix reference to IrField when serializing superclass' properties
2019-04-26 15:06:54 +03:00
Leonid Startsev
6bec6e6905
Add synthetic constructors to class member scope, so they won't fly 'in the air' in the backends
...
This is required mainly for Native compiler since it wont't work correctly on descriptors that are not present in the class.
2019-04-26 15:04:53 +03:00
Dmitry Gridin
37c856290f
Fix minor compile warnings
2019-04-25 19:47:39 +07:00
nikita.movshin
65244b4bea
Update copyright.
...
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Vyacheslav Gerasimov
2bc11cbd58
Remove as32 bunch files
2019-04-23 17:28:41 +03:00
Mikhael Bogdanov
0d3f03a15a
Support parallelization in another IDE tests
2019-04-17 11:22:18 +02:00
Leonid Startsev
1a0b7902c2
Create separate type arguments for writeSelf function, since it is static now.
...
Fixes kapt issue https://github.com/Kotlin/kotlinx.serialization/issues/429
2019-04-16 19:37:31 +03:00
Vyacheslav Gerasimov
d554b5aafa
Build: Embed projects not published to maven into kotlin-plugin.jar
2019-04-10 17:54:05 +03:00
Vyacheslav Gerasimov
83764c113f
as35: Upgrade to AS 3.5 C10
2019-04-09 15:06:22 +03:00
Simon Ogorodnik
3998e842f1
Abstract NewInference & related from KotlinType
...
Cleanup TypeConstructors & KotlinTypes in VariableFixationFinder
Cleanup TypeConstructors & KotlinTypes in TypeVariableDirectionCalculator
Cleanup KotlinTypes in TypeCheckerContext for ConstraintSystem
Cleanup KotlinTypes in NewCommonSuperTypeCalculator
Cleanup KotlinTypes in TypeApproximator
Cleanup type substitution
Cleanup NewTypeVariable
Cleanup StubType
Cleanup TypeCheckerContext creation, extract common supertype context
Provide TypeSystemInferenceExtensionContext via dependency injection
2019-04-01 22:08:04 +03:00
Leonid Startsev
0ffded5bac
Insert correct dispatch receivers and type arguments for expression inside generated by plugin IR functions
2019-04-01 18:54:16 +03:00
Leonid Startsev
ccca813792
Allow '@Serializable' on a type usage (for kotlinx.serialization/367)
2019-03-27 12:59:53 +03:00
Leonid Startsev
a2465910a3
Instantiating of Polymorphic in Companion.serializer() for JS and Native
2019-03-27 12:59:52 +03:00
Leonid Startsev
b108dbe568
Auto-applying @Polymorphic for interfaces and serializable abstract
...
classes
2019-03-27 12:59:51 +03:00
Leonid Startsev
859c95c3c4
Do not enable PolymorphicSerializer without special annotation
2019-03-27 12:59:49 +03:00
Leonid Startsev
9d707cb1d9
New instantiating type for polymorphic serializer
2019-03-27 12:59:48 +03:00
Leonid Startsev
472d91e0de
Do not return whole list of generated property descriptors for type
...
arguments' serializers when only one name is needed.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/383
2019-02-25 19:21:29 +03:00
Leonid Startsev
7d2c59fb70
Fix missing optionality of property when generating descriptor in Native
2019-02-19 15:52:04 +03:00
Leonid Startsev
8b16801f0d
Insert correct offsets in a lot of places in IR
...
Use correct type arguments when invoking a generic functions
Fix missing parent in initializer
2019-02-19 15:52:04 +03:00
Leonid Startsev
66272bfa74
Fix impossibility to make @Optional field in a class hierarchy on JS
2019-02-19 15:52:04 +03:00
Leonid Startsev
18667a5a34
Add validator for unique serial names
2019-02-19 15:52:04 +03:00