Commit Graph

59352 Commits

Author SHA1 Message Date
Svyatoslav Kuzmich 84757964bb Advance bootstrap to 1.3.70-dev-1806
Due to updated K/JS klib ABI

Add dependency of KotlinCoverageExtension to idea test classpath because of a new check introduced in 1806.

(cherry picked from commit bffbe89f53)
2019-11-22 22:12:39 +03:00
Nikolay Krasko 73a152ccc7 Re-mute inspection tests in AS34 (KT-32856) 2019-11-22 22:12:39 +03:00
Nikolay Krasko e49d7c86ff Re-mute move refactoring tests (KT-34106) 2019-11-22 22:12:38 +03:00
Nikolay Krasko 0ae677e945 Re-mute checker tests (KT-34105) 2019-11-22 22:12:38 +03:00
Nikolay Krasko 394a812329 Re-mute completion tests (KT-32919) 2019-11-22 22:12:37 +03:00
Nikolay Krasko 6797fb476c Support auto-mute from file for database with mutes 2019-11-22 22:12:37 +03:00
Nikolay Krasko 9356155f60 Minor: add bunch directives for better discoverability banched code 2019-11-22 22:12:36 +03:00
Vyacheslav Gerasimov 027bc671c1 Build: Remove duplicated compiler.xml from idea module
Workaround for JPS build by copying compiler.xml in test runner before tests

For gradle just copy it in the processResourcesTask of idea project

 #KT-34528
2019-11-22 18:52:00 +03:00
Pavel Kirpichenkov 8c103629a6 Disable FIR box test for callable references to vararg function 2019-11-22 18:22:04 +03:00
Nikolay Krasko 4267e9e3d0 Revert "Advance bootstrap to 1.3.70-dev-1806"
This reverts commit bffbe89f
2019-11-22 16:24:04 +03:00
Alexey Tsvetkov e506efb5b2 Include Klib metadata utils into jps-plugin
#KT-34958 Fixed
2019-11-22 15:35:30 +03:00
Vladimir Ilmov a0d4d0da58 [coroutine][debug] rollback compilation failed exception as it breaks test scenarios 2019-11-22 13:17:37 +01:00
Denis Zharkov 9dc628bd72 Fix FirJavaElementFinder.kt.183 compilation 2019-11-22 13:01:56 +03:00
Alexey Tsvetkov d3f906a1a2 Minor: extract method & reformat to improve readability 2019-11-22 12:54:42 +03:00
Kevin Bierhoff ed6b90002e conservatively generate code if descriptor unavailable, which happens for some suspend inline functions
KT-33604
2019-11-22 12:54:42 +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 b10f47b50e Minor: merge util methods for scripting to one file in idea-gradle 2019-11-22 11:43:35 +03:00
Natalia Selezneva 23f95872ad Minor: fix packages after moving classes to idea-gradle module 2019-11-22 11:43:35 +03:00
Sergey Rostov 75a23b4bc4 Minor: changes after review 2019-11-22 11:43:35 +03:00
Sergey Rostov fc100d13dd Scripting: move gradle specific logic to idea-gradle 2019-11-22 11:43:34 +03:00
Sergey Rostov 0fb58ed94c Scripting loading tests and extension points 2019-11-22 11:43:34 +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 29ef10a919 Check gradle version for loading script configuration during import option 2019-11-22 11:43:33 +03:00
Natalia Selezneva 72ef43f462 Show filePattern in settings for new script definitions if present 2019-11-22 11:43:32 +03:00
Natalia Selezneva c40cd07cf0 Do not show duplicated error gradle templates in settings
^KT-34530 Fixed
2019-11-22 11:43:32 +03:00
Natalia Selezneva d355a9f686 Minor: fix typo 2019-11-22 11:43:32 +03:00
Natalia Selezneva 229665d2fc Remove unused environment properties from gradle configuration resolver
getScriptContents is no longer used by Gradle
see https://github.com/gradle/gradle/blob/master/subprojects/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/resolver/ResolverEnvironment.kt
2019-11-22 11:43:32 +03:00
Natalia Selezneva 9710f1da77 Minor: move class 2019-11-22 11:43:32 +03:00
Natalia Selezneva 6c4de96dcb Minor: extract class to separate file 2019-11-22 11:43:31 +03:00
Natalia Selezneva 4b0844b21d Minor: move classes in idea-gradle module related to scripting 2019-11-22 11:43:31 +03:00
Roman Golyshev 28e2d2faf2 KT-34740 Make getImplicitReceiversWithInstanceToExpression keep script implicit receivers
- This makes completion aware of scripts implicit receivers (it matters in .gradle.kts files, for example)
- ^KT-34740 Fixed
2019-11-22 11:22:46 +03:00
Roman Golyshev be2fe256ba KT-34740 Refactor implicitReceiversUtils.kt 2019-11-22 11:22:46 +03:00
Pavel Kirpichenkov 34b8b96cde Generate forgotten FIR box test 2019-11-22 11:10:47 +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
Jens Klingenberg 508330e0bb Remove deprecated method from CommandLineProcessor 2019-11-22 16:06:35 +09:00
Ivan Gavrilovic 3a7deffe2e KT-33050: Pass source version to KAPT for JDK12+
In JDK 12+ source version should be passed using --source option,
instead of -source. This commit uses correct option based on the
JDK current build is using.

Fixes KT-33050
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
Vladimir Ilmov 7bdda22cfa [coroutine][debugger] broken testCompileOnly fix missing dependency aether-dependency-resolver in 192,193 versions 2019-11-22 07:27:18 +01:00
Zalim Bashorov 3fa431e114 [JS IR] Don't use full paths when generating comments with a path for file blocks 2019-11-21 23:51:09 +03:00
Zalim Bashorov c05c07f243 [JS IR] Generate special region comments at the start and the end of each file block
It allows to fold these blocks and navigate to them in the IDEA.

Also, this commit adds compiler configuration keys to control generating comments with paths for file blocks,
and now generating such comments is enabled only in our tests.
2019-11-21 23:51:08 +03:00
Zalim Bashorov fa76b9cf83 [JS IR] Use single line comment instead of JsDoc comment for comments with path 2019-11-21 23:51:08 +03:00
Zalim Bashorov 83e85b3ec8 [JS AST] Add single line comment node 2019-11-21 23:51:08 +03:00
Zalim Bashorov 5fe79f71ad [JS IR] Don't generate comment with path for "empty" files 2019-11-21 23:51:08 +03:00
Zalim Bashorov 4e3a2a0b3e [JS AST] Don't generate a new line after try and if-then blocks 2019-11-21 23:51:08 +03:00
Igor Yakovlev 8f9895e64e Add external keyword support for UL
Fixed #KT-34923
2019-11-21 22:49:23 +03:00
Pavel Kirpichenkov f80a71517f [NI] Handle vararg parameter in reflection type wrt array types
Vararg parameter in reflection type is interpreted as covariant
array type against array in expected functional type and as
vararg element type otherwise. For instance having function
fun foo(vararg args: Int): Unit { /*...*/ }
reference ::foo can be passed against expected
(Int) -> Unit,
(Int, Int) -> Unit, etc.
In none of such cases type for parameter in foo's reflection type
should be changed to array.
However, against expected type (IntArray) -> Unit args' type
must become IntArray.

^KT-25514 Fixed
2019-11-21 20:07:14 +03:00
Igor Yakovlev aba5ff0c1e Fix copy refactoring for multiply kotlin files
Fixed #KT-34971
2019-11-21 19:19:15 +03:00
Mikhail Glukhikh 7d944e2023 FIR dispatch receiver: check nullability only (expected vs actual type)
This gives a minor performance boost and prepares for upcoming K/J type mapping
2019-11-21 19:00:50 +03:00
Dmitry Savvinov 0dc7c37b62 Choose SDK consistently at least for non-COMPOSITE analysis
In COMPOSITE analysis we don't have a constant SDK dependency for whole
ResolutionFacade, so we have to find it manually via calling
'findSdkAcrossDependencies'

In SEPARATE mode we do have such a constant SDK dependency, but there
was an assumption that it doesn't make a difference (i.e.
findSdkAcrossDependencies always return the same SDK as passed constant
one)

Turns out that assumption was wrong, particularly for projects with
duplicate SDK entries in project structure. Then we would choose one SDK
in some cases, and the other one on other cases - even though they a
bit-to-bit equal, we will create separate descriptors for them, which
might lead to some issues, like in KT-34802

^KT-34802 Fixed
2019-11-21 18:56:49 +03:00
Alexander Udalov e4afbae954 Minor, fix test data for kotlinx.serialization bytecode text test 2019-11-21 16:44:30 +01:00