Commit Graph

144 Commits

Author SHA1 Message Date
Pavel Kirpichenkov b7e5d9faae Update annotation rendering in diagnostics
Disable annotation rendering in default type and descriptor renderers.
Preserve annotations in Android and Serialization plugins.
Update error texts in ide tests.
Nullability annotations in Java descriptors are rendered with context-dependent renderer.

#KT-20258 Fixed
2019-10-04 11:18:45 +03:00
Ilya Kirillov 2ace905429 Fix IndexOutOfBoundsException (EA-211554) in SerializationPluginDeclarationChecker 2019-09-29 12:27:44 +03:00
Georgy Bronnikov 6c2eb3dd16 Change expected test output 2019-09-27 16:32:15 +03:00
Leonid Startsev cec37cf78a Add supertype type arguments to super() call in deserialization ctor
#KT-31619 fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/525
2019-09-16 15:03:17 +03:00
Leonid Startsev 0b669e72b0 Do not report error about 'initializer required for @Transient properties' on lateinit vars
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/553
2019-09-16 15:03:17 +03:00
Leonid Startsev 4e516d7c94 Fix IR validation warnings in serialization plugin
- Insert patchDeclarationParents after whole processing
- Copy IR nodes to avoid duplications
- Insert correct type for getter during serialization of properties from parent class
- Do not use irThrowIse because it is broken somewhere in Native backend
2019-09-16 15:03:17 +03:00
Igor Yakovlev 27accbb089 Fix KotlinLintTestGenerated.testParcel + extensions registrations fixes 2019-09-13 19:40:31 +03:00
Igor Yakovlev cfcecaaeab LightClassApplicabilityCheckExtensions refactoring and IdeSerializationPluginApplicabilityExtension fix 2019-09-11 17:05:13 +03:00
Igor Yakovlev 2b7dee6f8d Add CodegenApplicabilityCheckerExtension and use it to fallback to Heavy LigthClasses
+ Fixed #KT-33584
2019-09-11 15:29:12 +03:00
Alexander Udalov bf5ca2ed84 Cleanup compiler warnings in IR-related modules 2019-09-03 19:32:57 +02:00
Nikolay Krasko 1c4ee6bd79 Remove as33 support
#KT-33536 Fixed
2019-08-30 12:13:09 +03:00
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