Commit Graph

1384 Commits

Author SHA1 Message Date
Ilya Gorbunov a18770fbbb Remove projectDist dependency helper usages
Use default configuration dependencies instead of projectDist ones.
2018-09-12 06:05:05 +03:00
Leonid Startsev fa990174ef Rename kotlinx-serialization => kotlin-serialization
Discussed with @elizarov and @ilya-g
2018-09-11 17:31:38 +03:00
Yan Zhulanow 50858b6fa3 Kapt, minor: Add a test for inline classes (KT-25800) 2018-09-11 16:41:21 +03:00
Yan Zhulanow 6f7741b6bb Minor: Move AbstractParcelBytecodeListingTest to compiler tests, change its format a bit 2018-09-11 16:40:43 +03:00
Yan Zhulanow 72637268c6 Minor, tests: Move EXPECTED_ERROR directives to the file end (to preserve stable line numbers) 2018-09-11 16:40:42 +03:00
Yan Zhulanow c517b85de1 Kapt: Support also erroneous super interface names 2018-09-11 16:40:42 +03:00
Martin Petrov dfff00d55f KT-26540: Support generated superclasses in KAPT
https://youtrack.jetbrains.net/issue/KT-26540

Included an integration test that relies on a generated superclass.
2018-09-11 16:40:42 +03:00
Ilya Chernikov a02d5b4b21 Rename script annotation params according to configuration keys...
rename evaluation params consistently too
2018-09-11 14:56:51 +02:00
Leonid Startsev 585d584857 Minor: get rid of some compiler warnings in kotlin-serialization-compiler-plugin 2018-09-11 14:36:10 +03:00
Leonid Startsev 7011e9422d Rename kotlinx-gradle-serialization-plugin => kotlinx-serialization 2018-09-11 13:22:17 +03:00
Leonid Startsev 23fd0a6ec9 Split IDE part from kotlinx-serialization-compiler-plugin 2018-09-11 13:22:16 +03:00
Mikhail Glukhikh 0169719a87 Add native dependencies to uast-kotlin module tests 2018-09-10 14:33:36 +03:00
Ilya Chernikov 3f2552af60 Export filename extension from KotlinScriptDefinition, register...
extensions after loading definitions
2018-09-10 11:21:26 +02:00
Mikhail Glukhikh f909761974 Add native dependencies to android-extensions-idea module tests 2018-09-08 12:16:26 +03:00
Leonid Startsev dea69e4469 Integrate serialization plugin into big Kotlin plugin
Split import handlers into multiple files
Add empty Maven handler for Android Studio

Add testRuntime dependency on kx-serialization-plugin for all modules which require compiler
plugins in test classpath
2018-09-07 21:17:07 +03:00
Leonid Startsev 087f60389a Migrating to 1.3 preview API 2018-09-07 21:17:06 +03:00
Leonid Startsev 359a37c9c3 Fix after rebase 2018-09-07 21:17:05 +03:00
Leonid Startsev 6770cccd61 [IR-plugin] New symbol tables 2018-09-07 21:17:04 +03:00
Leonid Startsev 566e5ce603 Updates for new API 2018-09-07 21:17:03 +03:00
Leonid Startsev 2e50e4e816 Extract naming conventions 2018-09-07 21:17:02 +03:00
Leonid Startsev 8cd5966c4a IR-plugin
[IR-plugin] Synthetic property declaration in $serializer

[IR-plugin] Saving most of simple cases

[IP-plugin] Some refactoring and start of work on load func

[IP-plugin] Loading simple case without validation

[IP-plugin] Rebase to IR types and Native-enabled

[IP-plugin] Generating .serializer() accessor in companion

[IP-plugin] Basic synthetic deserializing constructor, fixed some todos

[IR-plugin] Remove reference to SerialDescriptor.init() since K/N now has freeze-aware lazy
2018-09-07 21:17:01 +03:00
Leonid Startsev edcac21723 Names from new runtime 2018-09-07 21:17:00 +03:00
Leonid Startsev 9ad3922c7d Fix 1.2.50 compatibility
Updated version to 0.5.1

Fix resolving serializers for classes from other modules
(Kotlin/kotlinx.serialization/153)

Respect @SerialName on classes

Add support for @SerialInfo on class-level
2018-09-07 21:16:58 +03:00
Leonid Startsev 26ac6bd887 While creating descriptors, add type arguments not from serializable class definition
but from actual KSerializer implementation.
This provides better support for user-defined or external generic serializers

Fix order of resolving serializers: user-overriden should go before polymorphic and default

Don't generate additional constructor if @SerialInfo has no properties

Workaround for recursive resolve
on @Serializable(with) and @Serializer(for) pair annotations

Don't trigger the whole resolve if we need just to check that there is
an argument on the annotation; check PSI instead.

Also, return back check on serializable annotation constructor arguments
2018-09-07 21:16:57 +03:00
Leonid Startsev 572e8873ca Respect @Serializable(with) on properties on JS too.
Don't generate constructor for passing generic serializers if user already defined proper one.
2018-09-07 21:16:56 +03:00
Paul de Vrieze 365a183d01 Fix for Kotlin/kotlinx.serialization/136
Create a version that actually passes a type parameter in write$Self.
This version should take the correct type parameters from the class
rather than adding a function type parameter shared with all
serializers.
2018-09-07 21:16:56 +03:00
Leonid Startsev 114fb5790a Fix for Kotlin/kotlinx.serialization/118
Fix for Kotlin/kotlinx.serialization/123: resolve annotation parameters in-place
Fix for Kotlin/kotlinx.serialization/125
Now polymorphic serializer required by all modalities expect final
2018-09-07 21:16:55 +03:00
Leonid Startsev 97694e65aa Update version to 0.4
Optimize references in generated code. Also fixes Kotlin/kotlinx.serialization/issues/65

Fix (again) broken char boxing

Rebased on 1.2.40 and fixed broken compatibility

Fix https://github.com/Kotlin/kotlinx.serialization/issues/107 and code reformatting

(cherry picked from commit d4c307d)

Add correct type parameter information to synthetic declarations

Needed by kapt due to https://github.com/Kotlin/kotlinx.serialization/issues/76

Make correct call to sealed class constructor

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/112

Bump version

1.2.50-eap-1 compatible
2018-09-07 21:16:54 +03:00
Leonid Startsev 5e19e89dda Enhanced support for custom serializers definition
kotlin.Triple serializer

Resolving serializers for mutable collection interfaces on JS

Remove idea-related source files form maven compilation

Serialization url in plugin.xml

Removed note about JPS incompatibility

Don't use serial names in produced JS code (https://github.com/Kotlin/kotlinx.serialization/issues/43)

Generator for calling `update` functions

Fix synthetic serialinfo implementations for 2-slots vars (double and long) (https://github.com/Kotlin/kotlinx.serialization/issues/60)

Prohibit usage of nullable serializers for non-null fields (https://github.com/Kotlin/kotlinx.serialization/issues/59)

Fix incorrect `this` referencing after update to 1.2.20 compiler
2018-09-07 21:16:53 +03:00
Leonid Startsev 8c4daef969 Maven and Gradle project import handlers 2018-09-07 21:16:52 +03:00
Leonid Startsev 0f7a356af8 Extension points for synthetic function contributions
Pass real type arguments serializers to runtime lib
2018-09-07 21:16:51 +03:00
Leonid Startsev 703d715334 JPS plugin
Breaking changes in compiler plugin:

* Remove java.Serializable supertype
* Move serializer impl from companion to special inner class
* Add generic serializer fields in $serializer and serializer getter
in companion

kotlin.Pair serializer

Generating getter also for non-generic serializers

Generic serializers in JS
2018-09-07 21:16:51 +03:00
Leonid Startsev f42767fcc2 Serialization plugin GSK build
Fixed issue when serialDesc property getter was generated, but backing field not.

Respect @Serializable(with=...) on property

Calling 3-arg readElementValue for support of custom contexts

Ability to nest context-based serializer

Migration to 1.2-Beta2

Use polymorphicSerializer prior to default

Don't use polymorphic serializers for all java classes

Docs and maven project update

Remove plugin runtime dependency on stdlib
2018-09-07 21:16:50 +03:00
Leonid Startsev 8a250b07df Default case in "load" switch-case throws exception instead of silent read ending.
Improved error descriptions, fixed issue with transient properties
without backing field (Kotlin/kotlinx.serialization#2)

Don't add serialClassDesc property if user already defined one
(Kotlin/kotlinx.serialization#10)

Bump version to 0.1.1

Fix issue with mixing serial name with real property name (Kotlin/kotlinx.serialization#13)
2018-09-07 21:16:49 +03:00
Leonid Startsev 8cacaecf90 Changed serialization gradle plugin build to gradle
Env variable for idea SDK on TeamCity
Fix kotlin_root dir relative path

Updated broken API after rebase to 1.1.50

Bintray upload setup
2018-09-07 21:16:46 +03:00
Leonid Startsev ef11fb5857 Js synthetic generation plugin.
Fix for JS frontend resolving

Generating serialClassDesc property and save method (w/o virtual calls).

JS Serialization: Load function and synthetic constructor

User-defined serial annotations support

Reference array serialization in JS

Reference array serializer now requires KClass instance as first constructor argument

Finding enum serializer in common module for support in JS
2018-09-07 21:16:46 +03:00
Leonid Startsev 841693643a KotlinX serialization plugin applied onto latest master
IntelliJ project, ant task and maven goal for serialization plugin
Serialization IDEA plugin
2018-09-07 21:16:45 +03:00
Ilya Chernikov 836ea28fe7 Renaming remaining former "environment"-related identifiers 2018-09-06 19:17:44 +02:00
Ilya Chernikov 6716c512d3 [minor] Rename too long named functions 2018-09-06 19:17:43 +02:00
Alexander Udalov 87c0d56618 Drop Annotations.getAllAnnotations 2018-09-06 19:13:14 +03:00
Yan Zhulanow 280a3e3d26 Android Extensions: Support platform modules (KT-26169) 2018-09-06 14:42:23 +03:00
Yan Zhulanow a434cb00c6 Do not retain proxy-based components for compiler plugin settings in project model (again) (KT-24444)
The previous approach didn't work because Gradle wraps the copy() result, and the leakage didn't go away.
2018-09-06 14:42:20 +03:00
Vyacheslav Gerasimov b868450e9a Make dependencies on :kotlin-compiler project testRuntimeOnly everywhere 2018-09-05 22:58:31 +03:00
Yan Zhulanow 3276e348cc Fix kapt tests (Kotlin version updated to 1.3) 2018-09-05 17:15:04 +03:00
Alexander Udalov 896cf61443 Move JVM-specific annotation FQ names and utils to frontend.java 2018-08-27 23:37:06 +02:00
Alexander Udalov ab441dcd96 Drop PropertyDescriptorImpl.setType that takes KotlinType
Only use the other setType that takes an instance of
ReceiverParameterDescriptor. This will make sure that call sites can
use correct receiver annotations
2018-08-27 23:37:05 +02:00
Alexander Udalov 34c033bcaf Take ReceiverParameterDescriptor in FunctionDescriptorImpl.initialize
Instead of just KotlinType. This will allow to pass annotations on the
receiver at call sites
2018-08-27 23:37:04 +02:00
Vyacheslav Gerasimov bc544d764a Refactor build repositories to reduce number of unnecessary request
Setup for all projects only local, jcenter and bootstrap repositories
2018-08-27 18:09:26 +03:00
Yan Zhulanow b145c97b37 Kapt: Restore line mappings correctly for nested classes and its members 2018-08-24 04:28:13 +05:00
Yan Zhulanow c83581e6b8 Kapt: Strict mode. Issue an error if the converter fails to process a class (#KT-25518, #KT-24272) 2018-08-24 04:28:11 +05:00