Commit Graph

2965 Commits

Author SHA1 Message Date
pyos 8314b7d3c9 IR/Android: initialize the findViewById cache before super()
In general, calling open methods in open class constructors is unsafe
because their overrides will see an uninitialized instance. This change
makes it at least possible to use the view cache in such cases.

^KT-50627 Fixed
2022-01-10 21:08:43 +01:00
Irene Dea 19bfc43bee Fixes and refactors 2022-01-08 15:25:07 +03:00
mvicsokolova 5c3ce66e99 kotlinx.atomicfu compiler plugin (JS): delegated properties supported (#4692)
* kotlinx.atomicfu compiler plugin (JS): delegated properties supported

* NPE handling fixed

* Scoped delegated properties supported
2021-12-29 18:16:07 +03:00
mvicsokolova 188d073cc3 kotlinx.atomicfu compiler plugin (JS): tracing supported. (#4691)
* kotlinx.atomicfu compiler plugin (JS): tracing supported.

* Erasing trace invocations from both IrBlock and IrBlockBody.
2021-12-27 23:20:08 +03:00
Ilya Muradyan bb34a74abb REPL: Fix completion for protected members 2021-12-24 08:34:40 +03:00
Stanislav Erokhin 61526c9700 Move AbstractJsScriptlikeCodeAnalyser to the kotlin-scripting-compiler-js module 2021-12-23 20:10:19 +03:00
Nikolay Krasko 1e378ed136 Stop publication for kotlin-scripting-compiler-js
Library is in undefined status and might be removed soon.

^KTI-741 Fixed
2021-12-23 03:46:33 +03:00
Nikolay Krasko 8ef20aa045 Remove test dependencies from kotlin-scripting-compiler-js 2021-12-23 03:46:31 +03:00
Roman Artemev e17f121b23 [JS REPL] Extract JS script/repl parts into separate module
- don't load js evaluation plugin in CLI compiler
2021-12-21 04:15:11 +03:00
Nikolay Krasko 85521f01f8 Update shadow plugin 6.1.0 -> 7.1.1
Version 7.1.1 is absent in jcenter, so additional repository was added
in some modules.

Leave old version in NewMultiplatformIT.kt because of
`This version of Shadow supports Gradle 7.0+ only. Please upgrade.` error.

^KTI-733 Fixed
2021-12-20 21:39:00 +03:00
Vyacheslav Gerasimov 84469d0c68 Build: Fix test runtime for kapt tests 2021-12-16 21:48:29 +03:00
Vyacheslav Gerasimov 944c7990a1 Build: Use fake ideaHome for tests with intellij build number only
#KTI-82
2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov 318e001d1b Fix parcelize test dependencies on android plugin layoutlib
#KTI-82
2021-12-16 21:48:22 +03:00
Vyacheslav Gerasimov 049066f8ac Replace systemIndependentPath from Idea with invariantSeparatorsPath 2021-12-16 21:48:21 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Steven Schäfer 3f22321643 jvm-abi-gen: Do not write kotlin.Metadata default values
See KT-39492. This does not affect compilation, but it causes problems
in IntelliJ.
2021-12-16 16:11:32 +01:00
Aleksei.Cherepanov c998582e13 Fix configuration [JPS] Generate All Tests
Add missing dependency kotlin.core.descriptors.runtime.main instead of only kotlin.core.descriptors.runtime.test dependency,  as ReflectClassUtilKt (in main source set) is needed for tests generation
2021-12-16 13:05:14 +00:00
Dmitriy Novozhilov 23f5c22684 [Test] Update testdata of parcelize 2021-12-15 21:37:32 +03:00
Nikolay Krasko e733aa21d5 Fix error instead of muting it in kapt tests 2021-12-15 19:18:55 +03:00
Nikolay Krasko f2d649a7a1 Add dependency on dist for fir-plugin-prototype
> FirPluginDiagnosticTestGenerated$MemberGen.testClassWithCompanionObject
> java.lang.IllegalStateException: dist/kotlin-stdlib-jvm-minimal-for-test.jar does not exist. Run 'gradlew dist'
2021-12-15 19:18:50 +03:00
Leonid Startsev 4df34a20e7 Fix classSerializerAsObject test that got broken after conflict-merge
with b131c52889
2021-12-15 17:18:18 +03:00
Leonid Startsev 9b9522d714 Allow defining custom KSerializer for non-generic class as a class
Previously only objects were allowed. Due to a bug, this accidentally
worked in old backend.

#KT-46444 Fixed
Fixes https://github.com/Kotlin/kotlinx.serialization/issues/1587
2021-12-14 17:53:09 +00:00
Ilya Chernikov 1450f4d890 Implement property for explicit jvmTarget for script definition...
Apply the property to the default JSR-223 script taking the value from
java.specification.version property, so effectively implementing
jvmTarget detection from current VM.
Also drop enforcing of target 1.8, using common default.
#KT-49329 fixed
#KT-40497 fixed
2021-12-14 13:39:21 +03:00
Ilya Chernikov f0316cde54 [minor] test infrastructure: fix default handling in proc launcher 2021-12-14 13:39:21 +03:00
Ilya Chernikov ec2d6ea5f1 Restore script testing on both backends, fix some tests 2021-12-14 13:39:19 +03:00
Ilya Chernikov 670575696f Remove forced old backend for script compilation, using common default 2021-12-14 13:39:19 +03:00
Ilya Chernikov 6d6de9dd76 Implement tests for script instance capturing in the host tests 2021-12-14 13:39:18 +03:00
Ilya Chernikov 10c5071eda Implement backend error reporting on unsupported script capturing
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00
Steven Schäfer 4f3debdec6 [KAPT] Correct error types in annotations (KT-32596) 2021-12-14 11:31:25 +03:00
Ivan Kylchik b131c52889 Drop all usages of WITH_RUNTIME directive 2021-12-13 18:07:11 +03:00
Dmitry Petrov df460a842b JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-13 14:13:34 +00:00
Dmitry Petrov 6f148c594f Revert "JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter"
This reverts commit 627d838343.
2021-12-13 14:13:33 +00:00
mvicsokolova ff3abf9fc0 Set JS environments for kotlinx-atomicfu-runtime module (#4680) 2021-12-12 22:53:42 +03:00
Dmitry Petrov 627d838343 JVM_IR KT-50076 avoid CHECKCAST on moved dispatch receiver parameter 2021-12-11 08:04:26 +00:00
Alexander Udalov 3c9e3b7ed4 JVM IR: remove most dependencies of common backend.jvm code on codegen 2021-12-09 21:05:48 +01:00
Alexander Udalov b0c5ea4717 JVM IR: remove dependencies of lowerings on codegen
Move out utilities which are used both in lowerings and codegen to
JvmIrUtils and JvmIrTypeUtils, and introduce new JvmIrCoroutineUtils and
JvmIrInlineUtils (probably can be renamed or moved somewhere more
appropriate in the future).
2021-12-09 19:59:42 +01:00
Mikhael Bogdanov c599b58eb3 Remove obsolete options 2021-12-08 12:25:02 +01:00
Steven Schäfer 16a2aec296 Parcelize: Skip constructor checks when used with custom Parceler
See https://issuetracker.google.com/177850558
2021-12-08 11:07:10 +01:00
Steven Schäfer 58c687e42d Parcelize: Support @IgnoreOnParcel primary constructor parameters...
...with default values.

See https://issuetracker.google.com/177850560
2021-12-08 11:07:10 +01:00
Dmitriy Novozhilov 77101edfa4 [FIR] Setup tests for IC with compiler plugins
Most of those tests are ignored, because IC is not supported properly
  for compiler plugins. This commit is needed to prepare infrastructure,
  fix current behaviour and collect main problems of IC with plugins

Check fail.txt files in new testdata for explanation of problems
2021-12-03 14:17:41 +03:00
Dmitriy Novozhilov 11b9a6eed2 [FIR] Implement simple serializer like declaration generator
This generator is needed to test complex dependency between generated
  members and annotated classes in incremental compilation
2021-12-03 14:17:40 +03:00
Dmitriy Novozhilov 1d32d5c7d8 [FIR] Slightly reorganize directory structure of FIR plugin prototype 2021-12-03 14:17:38 +03:00
Dmitriy Novozhilov d585027431 [FIR] Rename tests of FIR plugin prototype 2021-12-03 14:17:36 +03:00
Dmitriy Novozhilov 86404b8027 [FIR] Implement IR body generators for all FIR declarations generators in plugin prototype 2021-12-03 14:17:34 +03:00
Dmitriy Novozhilov 974150a9d8 [FIR] Rename annotations in plugin prototype so they have meaningful names 2021-12-03 14:17:29 +03:00
Mikhael Bogdanov 0997207c7c Apply -Xjvm-default for specific modules only 2021-12-03 06:39:38 +01:00
Anastasiya Shadrina 37495bcba0 [FE] Change resolution scheme 2021-12-02 20:23:57 +03:00
Anastasiya Shadrina 3de1566f11 [Compiler plugins] Fix usage of descriptor API 2021-12-02 20:23:41 +03:00
Anastasiya Shadrina d923c95671 [FE] Add context receivers to scope 2021-12-02 20:23:22 +03:00