Leonid Startsev
4ec90b18bc
Rework DescriptorSerializerPlugin to be a part of Project's extensions
...
instead of statically registering it.
Static registering can cause subtle errors when plugin implementation
(e.g. SerializationDescriptorPluginForKotlinxSerialization) is registered
from multiple classloaders: in multi-module with daemon compilation scenario
#KT-41857 Fixed
2020-10-22 17:04:35 +03:00
Georgy Bronnikov
14b3beefb3
IR: IrDelegatingConstructorCall.fromSymbolDescriptor
2020-10-19 12:21:12 +03:00
Georgy Bronnikov
b28c85f5ea
IR: IrCall.fromSymbolDescriptor
2020-10-19 12:21:12 +03:00
Leonid Startsev
0616f948c7
Use actual form of decodeSerializableElement function in 'decodeSequentially'
...
code path in deserialize.
Old 3-argument form is deprecated and should be removed.
2020-10-16 15:24:12 +03:00
Mads Ager
af0999ec6f
[IR] Support isAssignable in builders and serialization.
2020-10-06 21:47:29 +02:00
Mads Ager
1f2ca606a5
[IR] Add isAssignable property to IrValueParameter.
...
Use it to check that only the value parameters that are explicitly
marked assignable are assigned.
Currently, the only parameters marked assignable are those for
default argument stubs.
2020-10-06 21:47:29 +02:00
Mads Ager
8d791ca98e
[IR] Update naming, but not binary format for IrSetValue.
2020-10-06 21:47:29 +02:00
Mads Ager
9a93bb3f09
[IR] Add IR support for setting parameters.
...
Use it in the JVM_IR backend for default values code. The parameter
local has to be overwritten for the inliner to work.
2020-10-06 21:47:29 +02:00
Ilya Chernikov
db23460fd5
Implement proper script runtime exception rendering with tests
...
#KT-42335 fixed
2020-10-06 21:43:11 +02:00
Yan Zhulanow
0dc243d74c
Parcelize: Don't activate both 'kotlin-parcelize' and 'kotlin-android-extensions' in IDE (KT-42267)
...
The actual problem is a lack of plugin activation check in ParcelableUltraLightClassModifierExtension (see how it should be done in ParcelizeUltraLightClassModifierExtension). However, ParcelableUltraLightClassModifierExtension lays inside ADT sources, and it's impossible to make an fast&easy fix from our side. However, we control the compiler plugin on which the IDE support is based, so the check is added there.
There should be no troubles if the application with 'kotlin-android-extensions' includes an Android library with 'kotlin-parcelize' or vise-versa, as runtime libraries of both plugins are attached to the 'implementation' Gradle configuration since AGP 2.5.
2020-10-07 04:11:02 +09:00
Steven Schäfer
714d17ac63
Parcelize, JVM IR: Handle star projected and nullable arrays.
2020-10-06 17:42:35 +02:00
Georgy Bronnikov
80b7194799
IR: remove KotlinType usage from Ir.kt
2020-10-05 11:02:12 +03:00
Ilya Chernikov
5ab822be36
Import scope of the imported script
...
#KT-34178
2020-10-02 18:53:31 +02:00
Leonid Startsev
bdbf8d7980
Use correct class type when creating class references
...
(for e.g. PolymorphicSerializer)
Former class reference may had type arguments in it, which lead to bugs
in JS IR.
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1072
2020-10-02 19:11:25 +03:00
Leonid Startsev
d4bdb0eedc
Remove requirement on 'Serializable class must have single primary constructor'
...
#KT-38868 Fixed
#KT-41627 Fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/396
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1049
2020-10-02 19:11:25 +03:00
Ilya Chernikov
d88e87aaac
Fix ScriptDefinition subtyping after earlier refactorings
...
#KT-41905 fixed
(may also fix other yet undetected or not analyzed problems with script
definitions)
2020-10-02 12:38:21 +02:00
Vladimir Dolzhenko
3c380faeb5
Added deprecated PackageFragmentProvider#getPackageFragments for BWC
...
Relates to ^KT-33394
^KT-42259 Fixed
2020-09-29 19:14:44 +00:00
Yan Zhulanow
cfd90c85cb
Kapt: Re-enable JDK 9/11 tests disabled by occasion
2020-09-30 00:31:08 +09:00
Yan Zhulanow
dba1b50aed
Parcelize: Don't write Parcelize model if the Parcelize plugin is disabled
2020-09-29 23:58:30 +09:00
Yan Zhulanow
9cdd6e9a8f
Kapt: Support new @JvmDefault functionality (KT-25960)
2020-09-29 23:58:30 +09:00
Yan Zhulanow
a44fd964cf
Kapt: Don't convert field initializers for enum fields inside companion objects (KT-37732)
...
For classes with companion objects, Kotlin compiler generates a 'Companion' static accessor field.
Java prioritizes fields over inner types (apparently, Scala does this as well, KT-29864), so the generated initializer doesn't compile.
As a workaround, initializer generatation is disabled for enum fields inside companion objects. Certainly, it's not a proper fix, however it does fix the regression.
2020-09-29 23:58:29 +09:00
Yan Zhulanow
db140b2815
Fix Pill debug IDEA run configurations
2020-09-29 23:58:25 +09:00
Yan Zhulanow
62affd8e0d
Kapt: Allow to strip @Metadata annotation from stubs (KT-36667)
2020-09-29 23:58:24 +09:00
Nikolay Krasko
99b9bc83a1
as42: Fix assertEqualsToFile usage
2020-09-29 15:32:34 +03:00
Nikolay Krasko
2df030f583
as42: Apply 201 <-> AS41 diff
2020-09-29 15:32:32 +03:00
Yan Zhulanow
af1ed77d15
Parcelize: Fix NPE on availability check
2020-09-29 02:37:44 +09:00
Mikhael Bogdanov
31ed5430ee
Minor. Update test data
2020-09-25 15:45:56 +02:00
Mads Ager
4e518e77ca
[JVM_IR] Fix expectations for parcelize tests.
...
The generated bridges now have line numbers as for the JVM
backend. There are some extra (irrelevant) labels in the JVM_IR
bytecode listing compared to JVM so expectations can still not
be shared even though they are closer.
2020-09-24 20:52:22 +02:00
Dmitriy Novozhilov
7380abac13
Split AsmUtils to descriptors dependent and independent parts
2020-09-24 16:51:05 +03:00
Dmitriy Novozhilov
d215c413cc
Move TypeMappingMode to :core:compiler.common.jvm
2020-09-24 16:51:05 +03:00
Yan Zhulanow
2d158ffebd
Parcelize: Add tests for deprecated (kotlinx.android.parcel) annotations
2020-09-24 15:50:59 +09:00
Yan Zhulanow
1d5ab192f5
Parcelize: Support old (kotlinx.android.parcel) annotations in Parcelize plugin
2020-09-24 15:50:59 +09:00
Yan Zhulanow
f0b93bf352
Parcelize: Move back annotations from kotlinx.android.parcel, deprecate them
2020-09-24 15:50:59 +09:00
Yan Zhulanow
0ce9003ef7
Parcelize: Add missing dependencies to Parcelize components in tests
2020-09-24 15:50:58 +09:00
Yan Zhulanow
15b2850ee0
Parcelize: Add IDE support for the Parcelize compiler plugin with sources extracted from Android Extensions plugin (KT-40030)
2020-09-24 15:50:57 +09:00
Yan Zhulanow
b7796d63d8
Parcelize: Add the Parcelize compiler plugin with sources extracted from Android Extensions plugin (KT-40030)
2020-09-24 15:50:57 +09:00
Yan Zhulanow
c9bca165bc
Update generated tests in android-extension-compiler
2020-09-24 15:50:57 +09:00
Steven Schäfer
aca9478998
Parcelize: Recognize (suspend) function types as serializable
2020-09-24 15:50:56 +09:00
Steven Schäfer
a2418484bb
Parcelize: More robust code for locating layoutlib.jar
2020-09-24 15:50:56 +09:00
Steven Schäfer
9bf3f105d9
Parcelize: Add a test for sealed Parcelable classes
2020-09-24 15:50:56 +09:00
Steven Schäfer
77fb0ddd32
Parcelize: Update test expectations
2020-09-24 15:50:55 +09:00
rbares
9d000529e7
Fix JVM Parcelize use of Parceler
2020-09-24 15:50:55 +09:00
Steven Schäfer
8ab6411b93
Parcelize, JVM IR: Fix types in nested containers
2020-09-24 15:50:55 +09:00
Georgy Bronnikov
df1d9a0113
IR: make IrTypeParameter.superTypes persistent mutable field
2020-09-22 23:53:39 +03:00
Leonid Startsev
eea4ff33a0
Adapt serialization exceptions constructor calls to signature change
...
(see https://github.com/Kotlin/kotlinx.serialization/pull/1054 )
2020-09-21 17:10:12 +03:00
Leonid Startsev
fe5dbf75fa
Add diagnostic to check whether provided custom serializer matches
...
type of the property.
Check for serializer type mismatch only when custom serializer is present
Otherwise, there are too many false positives on e.g. PolymorphicSerializer
#KT-36329 Fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/830
2020-09-21 17:10:12 +03:00
pyos
a06181771f
IR: make DescriptorMetadataSource a subtype of MetadataSource
...
FirMetadataSource is a metadata source too.
2020-09-16 18:58:40 +02:00
Steven Schäfer
56c4a27887
Android Synthetics: Resolve unbound symbols in the AndroidIrExtension
2020-09-15 22:36:50 +02:00
Steven Schäfer
fe466f3dc6
Android Synthetics: Update test infrastructure
2020-09-15 22:36:50 +02:00
Alexander Udalov
fc141a52da
IR: minor, make IrClass.companionObject return IrClass
2020-09-13 09:13:26 +02:00