Commit Graph

1978 Commits

Author SHA1 Message Date
Nicolay Mitropolsky 2772659ed2 Uast: Uast produces reified methods on his own because light-classes doesn't (KT-34316) 2019-11-26 15:13:40 +03:00
Nicolay Mitropolsky 9c18df61ca Uast: KotlinUMethod and KotlinUAnnotationMethod are separated (KT-30489) 2019-11-26 15:13:40 +03:00
Mikhail Zarechenskiy eb73650209 Fix race in IDE: inject proper storage manager for type parameters
With NO_LOCKS strategy we can easily end up in a situation when
 constraint system for a generic call is built incorrectly,
 producing flaky errors (or don't produce errors at all)

 Now proper storage manager is injected for all cases except:
 - IR
 - Codegen
 - Serialization plugin
 - Fake local objects

 Most likely, NO_LOCKS strategy for these cases is fine as at that point
 the compiler works in one thread

 #KT-34786 Fixed
2019-11-26 10:52:45 +03:00
Leonid Startsev b9ac1341ff Export generic serializer constructor from JS module
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/609
2019-11-25 20:06:15 +03:00
Leonid Startsev 73b9d2466a Do not report 'Missing @Serializable on enum with @SerialInfo' if enum
has custom serializer

#KT-34991 Fixed
2019-11-25 20:06:14 +03:00
Kevin Bierhoff 0285b26e40 make FunctionCodegen skip method bodies we don't need, which avoids problems with inlining methods inside methods we don't need
KT-33604
2019-11-22 12:54:42 +03:00
Natalia Selezneva ca71b2fe90 Add script configuration dependencies to script classpath
It was missing during configuration refinement thought new scripting API and during loading script configuration on Gradle project import

Do not pass additional classpath to configuration classpath: this may only affects Gradle with New scripting API (because it isn't used from other places)
In additional classpath kotlin-compiler and kotlin-stdlib was passed and there is no needs for this during loading Script Definitions through new scripting API

^KT-34626 Fixed
2019-11-22 11:43:34 +03:00
Natalia Selezneva 72ef43f462 Show filePattern in settings for new script definitions if present 2019-11-22 11:43:32 +03:00
Ivan Gavrilovic d269c194c7 Fix java version parsing in KAPT
Handle case when "java.version" returns
"11" or "12". Previously, we expected it to
contain at least one dot in the version string.
2019-11-22 16:06:35 +09:00
Ivan Gavrilovic f4c6f57354 KT-34194: Pass error/NonExistentClass for incremental KAPT run
When running KAPT incrementally, make sure to pass error/NonExistentClass.java
when there is at least one source file to process. This is to make sure
APs that must resolve all types are able to do so.

Test: updated KaptIncrementalWithAggregating/WithIsolating
2019-11-22 16:06:34 +09:00
Alexander Udalov e4afbae954 Minor, fix test data for kotlinx.serialization bytecode text test 2019-11-21 16:44:30 +01:00
Alexander Udalov 608449f41d IR: introduce StubGeneratorExtensions for ExternalDependenciesGenerator
This is a refactoring to simplify the API of
ExternalDependenciesGenerator and to constrain future additions of
platform-specific stub generator extensions.
2019-11-20 15:16:57 +01:00
Anatoly Nikitin 81e2e119e2 Fix propagation of dependency resolution failure reports during script compilation 2019-11-14 08:38:50 +01:00
Roman Artemev 63110ab636 [IR] Remove deprecated correspondingProperty from IrField 2019-11-12 20:45:11 +03:00
Roman Artemev ed79ab68ab [IR] Remove DeclarationDescriptor from IrExpression* tree API 2019-11-12 20:45:11 +03:00
Roman Artemev b391c066d6 [IR] Pass class Type Parameters into IrConstructorCall factory explicitly
to avoid unexpected crash on uninitialized parent in psi2ir phase
2019-11-12 20:45:11 +03:00
Roman Artemev ba373c67d7 [IR] Remove FunctionDescriptor from IrCall-like node's constructor interface 2019-11-12 20:45:11 +03:00
Alexander Udalov 57a674e9e6 Make fast class files reading mode default in compiler tests
This makes sense because this mode is the default in the production
compiler. Forgetting to enable it where necessary led to different
bizarre test failures, see for example changes around 3fee84b966 and
KT-34826
2019-11-11 15:40:49 +01:00
Alexander Udalov ce09be3f59 Add TargetBackend.isIR, simplify JVM IR test configuration 2019-11-11 12:10:29 +01:00
Georgy Bronnikov 688a2185fa Tests for Kapt3 with JVM_IR backend 2019-11-07 13:28:09 +03:00
Nikolay Krasko c50e60f90f More mutes for 193 branch
One more test for KT-34689.
2019-11-05 20:13:30 +03:00
Alexander Udalov efaf779133 Minor, fix test data for kotlinx.serialization bytecode text test 2019-11-04 16:17:58 +01:00
Georgy Bronnikov 51459adb8c Add integration test for Kapt3+IR 2019-11-04 11:26:45 +03:00
Georgy Bronnikov 195f225e36 Run Kapt3 with old backend, even if IR is specified in configuration
Kapt does not currently work with IR backend. Temporarily switch to the
old JVM backend when running it.
2019-11-04 11:26:45 +03:00
Vyacheslav Gerasimov 3b088818a5 Build: Add sources and javadocs to Kotlin Plugin publication 2019-11-01 16:22:42 +03:00
Ilya Chernikov 9aaf08de08 Fix equality for the KtFileScriptSource 2019-10-29 20:44:18 +01:00
Alexander Udalov cf61957e3c Minor, fix kotlinx-serialization bytecode test data
After some changes to the JVM IR backend
2019-10-25 11:23:11 +02:00
Vyacheslav Gerasimov b1d7df697d Build: Add dependency on gradle plugin to android-extensions-idea module 2019-10-24 21:01:27 +03:00
Vyacheslav Gerasimov 38ea5a85a3 Build: Add maven publication for Kotlin plugin artifacts 2019-10-24 17:06:19 +03:00
Ivan Gavrilovic 68723125f2 Clean up KAPT incremental tests
Remove redundant class to invalidate sources, because it is already
handled in the KaptContext constructor.
2019-10-24 21:33:01 +09:00
Yan Zhulanow 7fc25a9c04 Pill: Add GenerateRuntimeDescriptorTests to the "Generate all tests" run configuration (KT-34494) 2019-10-24 21:33:01 +09:00
Yan Zhulanow 6bf15b6d37 Kapt: Generate constant value initializers for mutable properties (KT-30164, KT-29355) 2019-10-24 21:33:01 +09:00
Yan Zhulanow 9edd4554a9 Kapt: Support @Deprecated annotations (KT-30368) 2019-10-24 21:33:01 +09:00
Yan Zhulanow f93549748a Fix a number of compiler/IDE warnings in IDE and kapt modules 2019-10-24 21:32:57 +09:00
Nikolay Krasko 4ed64b0283 Regenerate tests with TargetBackend.ANY remove and using runTest with this 2019-10-23 12:49:48 +03:00
Nikolay Krasko 2c0ce40f75 Refactoring: extract test dummy traces 2019-10-23 12:49:47 +03:00
Leonid Startsev e89aabbba1 Provide a diagnostic when @Serializable annotation is missing on enum.
It is required when enum members contain some special annotations which should be recorded in descriptor.
Due to some recursive/lazy resolve problems, compiler plugin frontend can't infer @Serializable on enum automatically, therefore, we ask a user to explicitly provide it.

Also fix ir tests
2019-10-21 19:48:29 +03:00
Leonid Startsev 3c9a02e271 Associate serializers added via @UseSerializers by argument class, not type
Use class instead of type because MyType<T> and MyType<Int> are different types, therefore map lookup was failing.

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/533
2019-10-21 19:48:27 +03:00
Leonid Startsev 855a867893 Support sealed, generic and abstract polymorphic inheritors in sealed class serialization 2019-10-21 19:48:26 +03:00
Leonid Startsev 1ebc65b8e4 Sealed classes serialization 2019-10-21 19:48:26 +03:00
Leonid Startsev 72f8f2b7b5 Custom-serializable enums for IR 2019-10-21 19:48:24 +03:00
Leonid Startsev bd8133e02c Custom-serializable enums for JS 2019-10-21 19:48:24 +03:00
Leonid Startsev e76ab06029 Custom-serializable enums for JVM 2019-10-21 19:48:23 +03:00
Leonid Startsev e9e7d1479a Remove redundant additional check for @Polymorphic annotation 2019-10-21 19:48:23 +03:00
Leonid Startsev 8a90b82e9b Object serialization for JVM, JS and Native 2019-10-21 19:48:22 +03:00
Vladimir Dolzhenko fa0398ffd3 Fix readAccess in ScriptExtraImportsProviderExtension on checking isScript
#EA-214435 Fixed
2019-10-21 17:18:24 +02:00
Igor Yakovlev 8c65a9a2aa Move AllOpen UL support to separate extension 2019-10-18 23:22:48 +03:00
Igor Yakovlev 3f9bffcc5f Move UL compiler plugin support to separate extension point 2019-10-18 23:22:47 +03:00
Igor Yakovlev 6ce37fff95 Add UL support for AllOpen compiler plugin 2019-10-18 23:22:47 +03:00
Igor Yakovlev 558a700f51 Add UL support for ParcelableCodegenExtension compiler plugin 2019-10-18 23:22:47 +03:00