Commit Graph

48975 Commits

Author SHA1 Message Date
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 02d0322029 Plugins renaming: kotlinx-<buildSystem>-serialization-plugin 2018-09-07 21:16:48 +03:00
Leonid Startsev 3eb10823d4 Maven serialization plugin 2018-09-07 21:16:47 +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
Simon Ogorodnik 6b5dcf6ae7 Add extension point to recognize library kind 2018-09-07 20:55:30 +03:00
Dmitriy Dolovov 08a66b61c2 Create built-ins via ProjectContext instead of GlobalContext 2018-09-07 20:55:30 +03:00
Dmitriy Dolovov d8937936a9 MPP: recognize source sets from Gradle project model (refactoring) 2018-09-07 20:55:30 +03:00
Mikhail Glukhikh 5e3fd189a4 MPP: make platformByCompilerArguments a bit safer 2018-09-07 20:55:30 +03:00
Dmitriy Dolovov 5633d86cb2 MPP: extend IdePlatformKind EP & determine it by CommonCompilerArguments 2018-09-07 20:55:29 +03:00
Mikhail Glukhikh 2e29a581f2 KotlinFacetEditorGeneralTab refactor: use chosenPlatform when possible 2018-09-07 20:55:29 +03:00
Dmitriy Dolovov 622c9bedad MPP: fix bug with displaying empty Kotlin targets in facet settings 2018-09-07 20:55:29 +03:00
Nikolay Krasko b4163f953f Add gradle.properties file with new codestyle for new Gradle projects (KT-23400) 2018-09-07 20:15:05 +03:00
Nikolay Krasko 3831ff1d05 Apply Kotlin official code style for projects created from wizards (KT-23400)
- Kotlin templates
- New Java projects with Kotlin support
- Gradle projects with Kotlin support
- Gradle projects with Kotlin DSL
2018-09-07 20:15:05 +03:00
Nikolay Krasko 921af44cb9 Import code style if gradle.properties has kotlin.code.style option (KT-23400) 2018-09-07 20:15:04 +03:00
Nikolay Krasko f94ff3dc26 Implement transition project code style to predefined code style (KT-23400) 2018-09-07 20:15:04 +03:00
Ilya Chernikov fa98b0afac Implement main-kts project and test 2018-09-07 18:47:18 +02:00
Ilya Chernikov 79bad24941 Simple ivy resolver with test 2018-09-07 18:47:18 +02:00
Ilya Chernikov d7f45253d5 Improve noDefaultJar behaviour:
- drop appropriate artifact from all configurations
- clean actions - in addition to task disabling
2018-09-07 18:47:18 +02:00
Zalim Bashorov 24dc8b33cd [JS IR BE] fix compilation of stdlib by IR BE after move coroutine related sources in stdlib 2018-09-07 19:22:35 +03:00
Mikhail Glukhikh 99a2add0e8 SimplifyCallChainFix: build new argument list more accurately
Related to KT-23691
2018-09-07 17:26:23 +03:00
Toshiaki Kameyama 1d2e18e263 SimplifyCallChainFix: Keep comments in place #KT-22552 Fixed 2018-09-07 17:26:15 +03:00
Mikhail Glukhikh 9bc874f647 replacedBaseClauseWithLet: rename & convert parameter to receiver 2018-09-07 17:24:47 +03:00
Mikhail Glukhikh 9ab8f3d7b5 Refactor clauseReplaceableBySafeCall (if-then to safe access) 2018-09-07 17:24:25 +03:00
Mikhail Glukhikh 485e098ced Handle implicit receivers more accurately in if-then to safe access
#KT-26599 Fixed
2018-09-07 17:24:19 +03:00
Mikhail Glukhikh ccb17caf7b Code cleanup: x as? Type ?: return -> if (x !is Type) return 2018-09-07 16:32:19 +03:00
Mikhail Glukhikh ad4da3d761 Code cleanup: convert flatMap { it } into flatten() 2018-09-07 16:32:18 +03:00
Mikhail Glukhikh dead2516c2 Redundant override inspection: don't report for ambiguous derivation
#KT-24405 Fixed
#KT-25883 Fixed
2018-09-07 16:32:11 +03:00
Mikhail Glukhikh 607392a2ab Cleanup code: KotlinRedundantOverrideInspection 2018-09-07 16:32:08 +03:00
Alexander Podkhalyuzin 6cee310c54 Fixed 181 branch 2018-09-07 16:08:51 +03:00
Dmitry Petrov 006c0aa740 Hide constructors accepting inline class parameters 2018-09-07 15:57:59 +03:00
Mikhail Glukhikh 8a5dbe1c6b Move property to constructor: minor refactoring
Related to KT-26015
2018-09-07 14:56:19 +03:00
Toshiaki Kameyama de6fdc5733 Move to constructor: choose property use-site target more precisely
#KT-26015 Fixed
2018-09-07 14:56:17 +03:00
Mikhail Glukhikh 29390dab42 Create actual: use analyzeWithContent to resolve annotations correctly
So #KT-26626 Fixed
2018-09-07 14:56:16 +03:00
Mikhail Glukhikh 26469b3365 Get rid of IndexNotReadyException in CreateActualFix
Related to KT-19586
2018-09-07 14:56:14 +03:00
Mikhail Glukhikh 74c5d8ed09 Create actual: do not generate default parameter values in constructor
So #KT-26517 Fixed
2018-09-07 14:56:13 +03:00
Mikhail Glukhikh ef4053d5c3 Invalidate module source roots in create actual to fix exceptions
Related to KT-19586
2018-09-07 14:56:12 +03:00
Mikhail Glukhikh fe9f655c26 Configure module source roots in create actual fix, if it's necessary
#KT-19586 Fixed
2018-09-07 14:56:11 +03:00
Alexander Podkhalyuzin 873463d24b Fixed deprecated IDEA API
#KT-24931 Fixed
2018-09-07 14:33:22 +03:00
Nikolay Krasko 1f1953cc38 Minor: use common trimIndent() in type hints tests 2018-09-07 12:29:06 +03:00
Nikolay Krasko 307586e435 Don't show types for enum entries with enum name is present in initializer (KT-26057)
#KT-26057 Fixed
2018-09-07 12:29:06 +03:00
Alexander Udalov ab3f8db743 Consider property accessor non-default if it has annotations
Otherwise we're not trying to load annotations on the parameter of the
property setter in MemberDeserializer.loadProperty.

Note that after this commit, we could now also assume that if
getter/setter is default, it has no annotations, and thus use
Annotations.EMPTY for default getter/setter in loadProperty. However,
this would cause reflection to work incorrectly on classes compiled by
an older Kotlin compiler, so we'll still try to load annotations on
default accessors for an indefinite time.

 #KT-25499 Fixed
2018-09-07 11:49:42 +03:00