Commit Graph

1445 Commits

Author SHA1 Message Date
Nicolay Mitropolsky daef6f09b9 183: IdeaKotlinUastResolveProviderService.kt.183 compilation fix 2018-11-21 18:55:07 +03:00
Nicolay Mitropolsky ebefcd476f 183: CliKotlinUastResolveProviderService.kt.183 compilation fix 2018-11-21 18:12:44 +03:00
Nicolay Mitropolsky 0ee98a8d1d 183: Uast: multiresolve (KT-27244) 2018-11-21 17:24:14 +03:00
Leonid Startsev 2e83ec1551 Restrict auto-implementing serializers methods to certain type of classes 2018-11-21 16:00:04 +03:00
Leonid Startsev 1535426a11 Don't add GeneratedSerializer as a supertype for user-defined serializers 2018-11-21 16:00:03 +03:00
Leonid Startsev a3e34af2f1 Increase priority of overridden serializer on type
Fixes Kotlin/kotlinx.serialization/252
2018-11-21 16:00:02 +03:00
Leonid Startsev 127ceaca34 Fix commented check when generating descriptor initializer:
It was needed before `save` because save references symbol of initializer,
yet we don't need to generate it if user provided its own getter
2018-11-21 16:00:01 +03:00
Leonid Startsev b76116a077 Do not add any .childSerializers() stuff if user explicitly marked custom serializer as KSerializer
todo: better design for user-provided descriptors and and schema hierarchy
2018-11-21 16:00:00 +03:00
Leonid Startsev 80c262ec66 Fix instantiation of generic serializers on JS
(Kotlin/kotlinx.serialization/244, which was fixed already by lookuping descriptor, but still had a bug)
2018-11-21 15:59:59 +03:00
Leonid Startsev a163e62f5f Rebased on master, adopt to new constant values from deserialized
annotations
Fix issue with generating redundant constructors for custom generic
seralizers
2018-11-21 15:59:58 +03:00
Leonid Startsev 2444a6680e .shouldEncodeElementDefault for JVM 2018-11-21 15:59:57 +03:00
Leonid Startsev 662e918a7b Support skipping values equals to defaults in output stream for JS and IR backends 2018-11-21 15:59:56 +03:00
Leonid Startsev dba6396e95 Support enums according to new design 2018-11-21 15:59:55 +03:00
Leonid Startsev f101e17dfa Support reference array and context serializers
Enum serializers are also instantiated, but won't work on native because of lack of KClass<E: Enum<E>>.enumValues()
2018-11-21 15:59:54 +03:00
Leonid Startsev ef42201b05 Fix order of overriding @Serializable(with) on property: check override, than @ContextualSerialization.
This will apply Context serializer event if class annotated @Serializable
2018-11-21 15:59:53 +03:00
Leonid Startsev abb8e5e914 Support @Transient properties initializers and init blocks in IR plugin 2018-11-21 15:59:52 +03:00
Leonid Startsev 104368de3b Better lookup for serializer() function in companion for generic classes because user can define a parameterless shorthand one
Fixes Kotlin/kotlinx.serialization/#228
2018-11-21 15:59:51 +03:00
Leonid Startsev 077f51e2f4 Generics serialization in IR 2018-11-21 15:59:50 +03:00
Leonid Startsev a4a1df0a81 Add information about secondary constructors to synthetic classes.
Before this, descriptors for such constructors were created in-place where they needed by the codegens.
However, presence of symbol table in IR backend requires the single instance of constructor descriptor across all compilation to be able to reference it and create a symbol. This support of generics in kotlinx.serialization on Kotlin/Native.
2018-11-21 15:59:49 +03:00
Leonid Startsev 01d3c7bdc8 Descriptors for IR 2018-11-21 15:59:48 +03:00
Leonid Startsev 3010814327 .childSerializers for JS 2018-11-21 15:59:47 +03:00
Leonid Startsev baf8cb6e9b Replace imported serialization-ide.jar with serialization-compiler.jar so JPS build also start working 2018-11-21 15:59:46 +03:00
Leonid Startsev e40383b1ce Introduce GeneratedSerializer and childSerializers
Descriptors passing on JVM
2018-11-21 15:59:45 +03:00
Leonid Startsev f0e81c6eb8 Respect @ContextualSerialization on file
Add common ancestor to all serializable generators
2018-11-21 15:59:44 +03:00
Leonid Startsev 82fa152514 Remove auto-applying ContextSerializer 2018-11-21 15:59:43 +03:00
Dmitry Petrov b3ce2eea39 Add LanguageVersionSettings to KotlinTypeMapper
KotlinTypeMapper clients should use proper LanguageVersionSettings when
possible.
2018-11-21 12:01:41 +03:00
Yan Zhulanow 5636227857 Android Extensions: Use lazy package fragment descriptors only in IDE 2018-11-21 12:34:01 +09:00
Yan Zhulanow 4f3f813b32 Android Extensions: Make AndroidPackageFragmentProviderExtension lazy 2018-11-21 12:34:01 +09:00
Yan Zhulanow 6f8d44750a Android Extensions: analyze layout XMLs lazily 2018-11-21 12:34:01 +09:00
Yan Zhulanow 12a05e0006 Android Extensions: Use smart pointers in 'AndroidResource' 2018-11-21 12:34:01 +09:00
Andrey Uskov dac4cb5d06 Fix source sets in all bunches except AS 33 in idea-android 2018-11-12 21:23:14 +03:00
Mikhael Bogdanov d2a205c72d Update synthetic parameter processing logic according to ASM 7 changes
#KT-27774 Fixed
2018-11-07 15:42:57 +01:00
Nicolay Mitropolsky bf42bd1226 Uast: fixes and tests for descriptors leak (KT-27663) 2018-11-01 15:23:54 +03:00
Vyacheslav Gerasimov 4076923a26 as34: Apply changes from AS 3.3 2018-10-26 18:25:20 +03:00
Alexander Udalov c1ab08c8ce Refactor KClassValue to store ClassLiteralValue internally
Only invariant array projections and non-null element types will be
supported soon (see KT-26568), so it makes no sense to store the
complete type in KClassValue. What we need is only the ClassId of the
class, and the number of times it's wrapped into kotlin/Array, which is
exactly what ClassLiteralValue represents.

This change helps in decoupling annotation values from
descriptors/types. The only constant value that depends on descriptors
is now AnnotationValue.

 #KT-26582 Fixed
2018-10-25 16:27:23 +02:00
Ilya Chernikov ae0b2405bc Add ide script settings for sources and accepted location 2018-10-25 13:09:34 +02:00
Ilya Chernikov 0e66c64a17 Implement new minimal extension point for providing (new) script definitions to idea
#KT-27817 fixed
2018-10-25 13:09:01 +02:00
Yan Zhulanow 7626cf6611 Minor: Update test data for kapt stub converter 2018-10-24 23:44:31 +03:00
Yan Zhulanow f19c0c3fb9 Minor: Fix inspection warnings in 'kotlin-annotation-processing' 2018-10-24 20:12:41 +03:00
Yan Zhulanow 17c02a77c7 Minor: Fix inspection warnings in 'kotlin-annotation-processing-base' 2018-10-24 20:12:40 +03:00
Yan Zhulanow 1f6dbc74da Kapt: Restore constant identifiers for field annotations (KT-27334)
The old behavior broke after the refactoring of annotations with use-site targets.
2018-10-24 20:12:37 +03:00
Yan Zhulanow 0ae5d1c08f Kapt: Log annotation processor initialization time 2018-10-24 20:12:36 +03:00
Yan Zhulanow 6d017f07ad Kapt: Support androidx.annotation.RecentlyNullable annotations (KT-26725) 2018-10-24 20:12:35 +03:00
Yan Zhulanow ac1dd59472 Kapt: Fix anonymous type transformer, do not use ClassDescriptor.defaultType as a replacement (KT-27119) 2018-10-24 20:12:34 +03:00
Yan Zhulanow 39863edd0e Kapt: Use correct type mapping mode while mapping super types (KT-27126) 2018-10-24 20:12:32 +03:00
Yan Zhulanow f6bf35c1f5 Kapt: Fix error type correction for super class constructor calls 2018-10-24 20:12:31 +03:00
Yan Zhulanow ba53ba37b0 Replace bunch copies for some of build.gradle.kts files with a DSL 2018-10-24 20:12:30 +03:00
Yan Zhulanow 81cfc3e39f Kapt: Support symlinked Java source files (KT-26817) 2018-10-24 20:12:29 +03:00
Yan Zhulanow 65a1dd9350 Minor: Add a package to JavaKaptContextTest, make it a TestCase 2018-10-24 20:12:28 +03:00
Yan Zhulanow 5d2a3c097c Minor: Update kapt test (nullability annotation is gone in Enum constructors) 2018-10-22 23:06:05 +03:00