Commit Graph

2042 Commits

Author SHA1 Message Date
Dmitry Gridin 62760bdac3 i18n: update bundle in idea-gradle
#KT-37483
2020-03-30 14:58:29 +07:00
Nicolay Mitropolsky 2eb6f1988d Uast: process catch parameters and finally blocks (KT-35804) 2020-03-26 12:55:45 +03:00
Nicolay Mitropolsky f1d5570ca1 Uast: include parameters of reified methods to uast tree (KT-37613) 2020-03-26 12:55:44 +03:00
Ilmir Usmanov be87d5fab5 JVM_IR: Serialization: do not mess with return types of call expressions
If return type of IrConstructor is different from containing class, we will
generate call to wrong <init> method, leading to VerifyError.
If we do not specify the type of irNull, it, by default, will be Nothing?,
when really we need Any?. This leads to CCE: cannot cast to Void at runtime.
2020-03-19 15:18:32 +01:00
Dmitry Gridin cb3a31af6e UAST: implement KotlinUastCodeGenerationPlugin for 201
#KT-37569 Fixed
2020-03-19 16:58:58 +07:00
Mikhail Glukhikh 26f919df03 Fix some nullable usages of not-null type parameters (KT-36770) 2020-03-18 10:24:26 +03:00
Nikolay Krasko 1afd3d929a 201: Update to 201.5985.32 2020-03-12 03:02:28 +03:00
Leonid Startsev e495c35ad7 Use upper bound as a type for polymorphic serializer
when it is used in sealed class case

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/753
2020-03-11 17:09:05 +03:00
Leonid Startsev 15fa6ea757 Do not insert @SerializableWith marker annotation if already present
Such situation may happen if generic class is customized by user
with object-kind serializer. In such case, both arguments from
generateSerializerGetter and generateSerializerFactory are objects.
See linked issue for details:

Fixes https://github.com/Kotlin/kotlinx.serialization/issues/749
2020-03-11 17:07:17 +03:00
Leonid Startsev e20354926b Do not check 'no ctor parameters' for serializable enums
fixes https://github.com/Kotlin/kotlinx.serialization/issues/742

Do not use serializableIrClass if it is not bound (this may happen
in case we're generating external serializer for library class)

fixes https://github.com/Kotlin/kotlinx.serialization/issues/744
2020-03-11 17:07:16 +03:00
Nicolay Mitropolsky d1739289c6 Uast: UastFakeLightMethod hashcode fix (KT-37200) 2020-03-11 15:54:01 +03:00
Vyacheslav Gerasimov f735396ffb Build: Make toolsJarApi() helper for JPS build 2020-03-10 17:24:21 +03:00
Vyacheslav Gerasimov ef169aa12b Build: Use preprocessed tools.jar for compilation
tools.jar from JDK has different public api on different platforms which
makes impossible to reuse caches for tasks which depend on it. Since we
can't compile against those classes & stay cross-platform anyway, we
may just exclude them from compile classpath. This should make tools.jar
compatible at least within one build of JDK for different platforms
2020-03-10 17:24:21 +03:00
Nicolay Mitropolsky 753d4b3cbd Uast: UastFakeLightMethod equality fix (KT-37200) 2020-03-10 11:33:56 +03:00
Leonid Startsev a2c24e696f Leverage existing psi2ir function declaration generator in plugin
This seems to be the only reasonable way to provide function declarations with
_correctly_ substituted type parameters without rewriting logic from scratch;
correctly scoped type parameters in IR are now required in serialization
plugin by all backends.

Also fix some missing upper bounds.
2020-03-05 16:40:55 +03:00
Mikhael Bogdanov 9052ef06a7 Introduce configureEnvironment, avoid 'createEnvironment' calls 2020-03-04 14:51:10 +01:00
Mikhael Bogdanov a795c38eb7 Introduce base class for codegen and diagnostic tests
Extract base TestFile and TestModule classes.
 Move coroutinePackage related logic to base class
2020-03-04 14:51:10 +01:00
pyos 9b68e4fe56 Android/IR: handle nulls from getView/getContainerView
Turns out it's possible to create an IR builder without a backend
context
2020-03-03 14:19:47 +09:00
Vyacheslav Gerasimov 0db69cadb6 Build: Make all compile dependencies on toolsJar compileOnly
tools.jar differs between different versions of JDK reducing cache reuse
so better to not leak it to other modules
2020-02-29 16:35:54 +03:00
Nikolay Krasko 8501ea78c8 201: Mute a lot of tests with enums 2020-02-28 11:36:40 +03:00
Nikolay Krasko 958b8a0b10 201: Fix maven plugin loading by adding repository-search to runtime 2020-02-28 11:36:37 +03:00
Dmitry Petrov ea7b5827ab Minor: update testData for bytecode listing tests 2020-02-27 13:36:24 +03:00
Stanislav Erokhin 453008e488 Deprecated reportFromPlugin way to report diagnostics from plugin
Originally reportFromPlugin method was introduced to address the problem
with loading of DefaultErrorMessages.Extension vis ServiceLoader.
For some cases this extension was not loaded by ServiceLoader because
classes was loaded via different class loader, common scenario here is
compiler plugins. Ideally we should load such extension point via
getService approach, but unfortunately to do that we need project and
DefaultErrorMessages.render is static method for now.
Also with reportFromPlugin approach is a problem -- all diagnostics
reported via this method has the same id: PLUGIN_[WARNING|ERROR|INFO]
and it isn't possible to suppress only one particular diagnostic.
To bypass this problem the new method
initializeFactoryNamesAndDefaultErrorMessages was introduced.
It basically store DiagnosticRenderer inside DiagnosticFactory.
It is not ideal, because one DiagnosticFactory could have different
renderers for different scenarios -- for compiler and for IDE, but
I think that it is better than reportByPlugin approach.
2020-02-26 12:12:31 +03:00
Nikolay Krasko 272ccf64ae Refactoring: extract resetApplicationToNull to separate file 2020-02-18 14:13:54 +03:00
Roman Artemev 31d73c5d79 [Psi2Ir] Move to new linkage scheme based on IdSignature
Now SymbolTable operates with two types of symbols (public and private)
In case of Public symbol IdSignature is used as table key
Private one uses descriptor as the key in similar scheme as before
2020-02-14 18:22:16 +03:00
Leonid Startsev bdf1441c80 Remove special casing for Unit in kotlinx.serialization
Unignore test since it is in muted list and auto-generated
2020-02-14 14:28:51 +03:00
Ilya Chernikov 6356807997 Reapply "Only create descriptors for candidates with lambda args"
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01:00
Yan Zhulanow b1414fa477 EA-214662: Support property accessors in UastLightIdentifier 2020-02-14 17:35:18 +09:00
Yan Zhulanow c196ce5f09 Pill: Pack embedded dependencies to artifacts 2020-02-14 17:35:16 +09:00
Yan Zhulanow a2be789d37 Pill: Move out Pill tasks from buildSrc 2020-02-14 17:35:16 +09:00
Nicolay Mitropolsky bf9d4f065b Uast: eliminating the kotlin.uast.multiresolve.enabled, it is always true for a long time 2020-02-13 15:54:48 +03:00
Nicolay Mitropolsky e4b7c39110 Uast: forcing kotlin.uast.force.uinjectionhost=true always 2020-02-13 15:54:48 +03:00
Ilya Chernikov b96109f23f Add diagnostic code to the ScriptDiagnostic
to allow checking for specific errors, e.g. incomplete statements in
the REPL
2020-02-13 11:33:40 +01:00
Ilya Chernikov 514282fb0a Use correct platform classloader on script evaluation in cli compiler
#KT-28475 fixed
also minor testing infrastruct refactoring
2020-02-13 11:33:40 +01:00
Mikhail Zarechenskiy c64577b735 Temporary fixes for Kotlin project after enabling NI
Most of these fixes will gone away after compiler bootstraping
2020-02-13 11:15:57 +03:00
Pavel Kirpichenkov 572dee6835 Revert "Only create descriptors for candidates with lambda args"
This reverts commits:
349d07ad43
2249c223fe

Revert due to differences in test data with NI enabled
^KT-36247 Open
2020-02-12 20:52:30 +03:00
Nikolay Krasko 314474c33b 201: uast-tests.jar new dependency (depend on whole idea in tests) 2020-02-11 20:28:04 +03:00
Nikolay Krasko 162c2f3dc9 201: openapi.jar is removed 2020-02-11 20:27:59 +03:00
Ilya Chernikov 2249c223fe Only create descriptors for candidates with lambda args
#KT-36247 fixed
2020-02-10 14:21:02 +01:00
Yan Zhulanow 36a6eedd9c Minor: Update generated tests for KT-34569 2020-02-10 21:25:01 +09:00
Dmitry Petrov b9357b5486 Fix project build, part 2 2020-02-10 11:49:54 +03:00
Dmitriy Novozhilov 3d671cbbad Fix compiler error in test generator 2020-02-10 10:54:04 +03:00
Anton Bannykh e8fba8bcb6 IR API: change val ... : MutableList to var ...: List for most lists
All mutable state for IR declarations should be either:
- var (mutable properties)
- or class member list

Mutable properties are straightforward to persist.

The class member list is handled in a special way.
2020-02-06 21:03:32 +03:00
Nicolay Mitropolsky 222ceb7698 Uast: fix for Lambda in place call identifiers (KT-35432) 2020-01-29 19:57:43 +03:00
Nicolay Mitropolsky ac3a8eb494 Uast: fixes for Enum identifiers (KT-35432) 2020-01-29 19:57:43 +03:00
Dmitriy Dolovov 9594b8db42 Rename Kotlin/Native modules for uniformity 2020-01-29 20:30:46 +07:00
Dmitriy Dolovov b49e6ac581 Rename :kotlin-native:kotlin-native-library-reader to :native:frontend.native 2020-01-29 20:30:29 +07:00
Georgy Bronnikov 8f4b4007fe JVM_IR: Add test for compiling against cross-platform Klib 2020-01-28 12:19:43 +03:00
Yan Zhulanow 9bf63f5399 Kapt, minor: Add extra case for property initializers 2020-01-24 18:12:21 +09:00
pyos ca3c1d04c5 Add an IR version of Android Extensions blackbox tests 2020-01-24 18:12:21 +09:00