Commit Graph

60835 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 9bc62fc34d [FIR-TEST] Mute test due to incorrect invoke desugaring 2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov 5f639dd2ae [FIR-TEST] Update testdata of old frontend tests 2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov 19e0b8039b [FIR] Cleanup DFA code and rename some classes for better understanding 2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov 16a9ca5912 [FIR] Remove old DFA 2020-01-22 14:49:21 +03:00
Dmitriy Novozhilov 5d3b75ebc3 [FIR] Implement new data flow analysis 2020-01-22 14:49:21 +03:00
Ilya Matveev 2c66c3b0b6 Gradle, native: Allow setting destination directory for binaries
Issue #KT-29395 fixed
2020-01-22 17:29:32 +07:00
Ilya Matveev df46dfc63d Gradle, native: Don't pass to compiler missing klib files
We don't compile a klib if there are no sources for it (NO-SOURCE
checks). So, we need to take this fact into account and don't
pass such libraries to compiler in dependent modules. See also:
GH-2617 in the K/N repo.

This patch checks that a klib file exists before passing it to the
compiler.
2020-01-22 17:29:31 +07:00
Ilya Matveev ce45df2c96 Gradle, tests: Skip building in native binaries test for Groovy DSL
This test is one of the most time-consuming tests because
it builds a lot of final native binaries. Moreover, it exists
in two versions: for Groovy DSL and for Kotlin DSL. The only
difference between these versions is build script DSL.

This patch disables project building for the Groovy DSL version to
reduce total test execution time. Now this test only checks that
project configuration is successful. But it's enough to detect DSL
problems.
2020-01-22 17:29:30 +07:00
Ilya Matveev 01622f069e Gradle, native: Support exporting dependencies for static and shared libs
Issue #KT-35352 fixed
2020-01-22 17:29:30 +07:00
Sergey Rostov c7e3df506d gradle.kts importing: proper check for root project 2020-01-22 12:08:30 +03:00
Natalia Selezneva b38836c488 Fix script configurations for gradle project without source roots in 193 and as40
GradleKtsImportTest:testEmpty fixed
2020-01-22 09:48:04 +03:00
Ilya Gorbunov 7ec04a1bf9 generators: extract OperationsMap generator to a separate source set
Refactor generators so that OperationsMapGenerator is in its own
source set with minimal dependencies.
2020-01-22 06:16:56 +03:00
Ilya Gorbunov 2251c27167 J2K GeneratorsFileUtil 2020-01-22 06:04:38 +03:00
Ilya Gorbunov d64ec71205 J2K GeneratorsFileUtil: Rename .java to .kt 2020-01-22 06:04:38 +03:00
Dmitry Petrov 64a405e7a0 IR: 'fun interface' support 2020-01-22 00:12:03 +03:00
Ilmir Usmanov a55989a2a5 JVM_IR: Support interface delegation of suspend functions
The issue was, that built IR function does not have a PSI element,
which is required to report error on suspend functions inside monitors.
In this case, use PSI element of the class, containing the function,
which is consistent with old BE.
2020-01-21 19:59:02 +01:00
Alexander Udalov e34a207725 Implement KTypeProjection.toString
The implementation is checked by tests on typeOf.

 #KT-30071 Fixed
2020-01-21 19:34:01 +01:00
Vladimir Dolzhenko 3a90e2dd75 Store addUnambiguousImportsOnTheFly in kotlin code insight settings
store optimizeImportsOnTheFly in kotlin code insight workspace settings

#KT-36034 Fixed
2020-01-21 17:53:23 +01:00
Alexander Podkhalyuzin 70ed03ac4b Now using Kotlin setting instead of Java one in 191 as well 2020-01-21 17:52:41 +01:00
Ilya Chernikov dca0a71d9b Add only non-jdk classpath entries from the compiler to script
remove unnecessary manifest classpath entries in the saved compiled
script jar
2020-01-21 17:42:48 +01:00
Ilya Chernikov 75441386e3 Use scripting cache earlier in the pipeline:
before initializing compiler and processing callbacks
2020-01-21 17:42:48 +01:00
Ilya Chernikov c7d9eaed40 Speed up REPL package member declaration provider
about 10-15% on specific test
also preparing test infrastructure for it
2020-01-21 17:42:48 +01:00
Ilya Chernikov cb7cc8ac6b [minor] fix typo in function name 2020-01-21 17:42:48 +01:00
Ilya Chernikov 1b65ec75ad Immplement default cache in main-kts 2020-01-21 17:42:48 +01:00
Ilya Chernikov a4752087db Get rid of kotlinx.coroutines usage in saved script runner
to reduce dpendencies for the save dscipt running
2020-01-21 17:42:48 +01:00
Ilya Chernikov 891914167a Switch cli expression evaluation argument syntax to -expression/-e
#KT-35414 fixed
2020-01-21 17:42:48 +01:00
Ilya Chernikov 5f15cacb1b Fix ivy mapping to the maven repos in main-kts 2020-01-21 17:42:48 +01:00
Ilya Chernikov b5ac35dec1 Implement automatic loading of .main.kts scripts support
also fix discovery from ScriptDefinitionsProvider
2020-01-21 17:42:48 +01:00
Ilya Chernikov d15d62a338 Check REPL snippet syntax before calling analysis
restores the behaviour of the GenericRepl implementation and fixes
issues then invalid code is being compiled
#KT-34888 fixed
2020-01-21 17:42:48 +01:00
Steven Schäfer 8e07482862 JVM IR: Fix generation of parameterless default constructor
The JVM backend does not generate parameterless default constructors for
private constructors and constructors of local, inner, or inline
classes.
2020-01-21 16:34:33 +01:00
Alexander Udalov 5321a6af33 Forbid spread operator in signature-polymorphic calls
#KT-35226 Fixed
2020-01-21 15:57:35 +01:00
Alexander Udalov b6feec4115 Add language version 1.5 2020-01-21 15:57:35 +01:00
Alexander Udalov 8e2b76698a Remove -Xno-use-ir from modules where JVM IR problems are fixed
The problems in JVM IR backend in these modules are fixed by:
* kapt3-cli -- 1c527fc1
* frontend -- 174b3db7
* daemon-common-new -- 6fe214d8 & d17afdda
2020-01-21 15:09:29 +01:00
Alexey Tsvetkov d3a93b2015 Remove unneeded IncrementalCompilerRunner#postCompilationHook
The method is no longer needed, since the only implementation is empty.
2020-01-21 16:36:37 +03:00
Alexey Tsvetkov ba0ce92159 Report messages only after IC scope expansion converged
Incremental compilation scope (set of files to be compiled)
could be expanded, even if the frontend reported some errors
to a message collector.
The next iteration of IC could produce a different set of
compiler messages, so we want to report them only after
scope expansion converged.
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov c912f76d6f Add IC scope expansion tests
#KT-13677
  #KT-28233
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov b979be701e Remove some unneeded gradle specific IC logs
They stoped being different from JPS logs for some time
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov ef83431618 Recompile all dirty files in case of error 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 2d598d50d7 Expand compilation scope for IC before backend is run
Sometimes IC raises compilation errors when rebuild succeeds.
This happens because IC uses serialized decriptors
for non-dirty files. Serialized descriptors can be different
from source file descriptors. For example, a source file
may contain an implicit return type or an implicit visibility
for overridden methods, but serialized descriptors always
contain explicit return types & methods' visibilities.

These problems can be solved by expanding a scope of incremental compilation
just after the analysis, but before error reporting & code generation.
In other words, we need to compare descriptors before error reporting and code generation.
If there are new dirty files, current round of IC must be aborted,
next round must be performed with new dirty files.

This commit implements IC scope expansion for JS Klib compiler

    #KT-13677
    #KT-28233
2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 4f3418dc89 Minor: use CompilerConfiguration#putIfNotNull for IC services 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov a950226602 Format and cleanup incremental-compilation-impl 2020-01-21 16:36:36 +03:00
Alexey Tsvetkov 5816722a64 Minor: remove unused property 2020-01-21 16:36:36 +03:00
Ilya Gorbunov db252f60cd Rename task generateTests in android-tests project
The new name is generateAndroidTests.

The output of this task is not committed to VCS, so there's no need
to run it when "Generate All Tests" run configuration is executed.
2020-01-21 16:20:47 +03:00
Natalia Selezneva f0cb51a5bc KotlinDslScriptModel request shouldn't fail the gradle build 2020-01-21 15:56:01 +03:00
Natalia Selezneva 606279b462 as36: Update to AS 3.6 RC (192.7142.36.36.6071332)
^KT-36005 Fixed
2020-01-21 15:56:01 +03:00
Natalia Selezneva 4699ba758e Remove unnecessary bunch file for AS4.0 2020-01-21 15:56:01 +03:00
Ilya Gorbunov 61b3f447b1 Remove jsIrDist (kotlin.stdlib.js.ir.dist) flag and the logic it enables
It is no longer needed since JS IR is published in JS artifacts,
and there's no longer separate "-js-ir" artifacts.

Changes in BuildProperties.kt will take effect after the next
kotlin-build-gradle-plugin publishing.
2020-01-21 15:54:24 +03:00
Tsvetan 5f0e3018db KT-27856 Add contracts to Timing.kt lambdas (#1987) 2020-01-21 15:42:21 +03:00
Vladimir Ilmov 7dc29a1840 Coroutine debugger starting even if registry key set to false - fixed 2020-01-21 11:39:13 +01:00
Vladimir Ilmov 9f720e576d [coroutine] ComboBox disabled as in progress 2020-01-21 11:39:13 +01:00