Commit Graph

45134 Commits

Author SHA1 Message Date
Mikhail Zarechenskiy 928a342ace Initial version of codegen for inline classes 2018-02-05 12:07:40 +03:00
Mikhail Zarechenskiy fbc02dee58 Refactoring: extract method to generate suspend method out 2018-02-05 12:07:40 +03:00
Mikhail Zarechenskiy d1049e5553 Refine type mapping for nullable inline class types 2018-02-05 12:07:39 +03:00
Mikhail Zarechenskiy d5400f11a3 Basic inline class mapping to the underlying representation 2018-02-05 12:07:39 +03:00
Mikhail Zarechenskiy 4b4525ec17 Support !LANGUAGE directive in signature tests 2018-02-05 12:07:39 +03:00
Mikhail Zarechenskiy d1a8ec06dd Reformat typeSignatureMapping.kt file 2018-02-05 12:07:38 +03:00
Mikhail Zarechenskiy a463fb1d5e Add basic declaration checker for inline classes 2018-02-05 12:07:38 +03:00
Mikhail Zarechenskiy 915455ebe9 Introduce InlineClasses language feature
Allow to write `inline` modifier in front of class declaration
2018-02-05 12:07:38 +03:00
Denis Zharkov 9b28d1a21c Make precise java classes tracking in Gradle enabled by default
#KT-22192 Fixed
2018-02-05 11:54:53 +03:00
Natalia Selezneva 74a9881e9d Fix "Virtual pointer hasn't been disposed" exception in tests. Add sdk to ProjectJdkTable. 2018-02-05 09:46:57 +03:00
Nikolay Krasko f05e926670 Update idea to 173.3.4 (173.4548.28) 2018-02-03 00:15:45 +03:00
Nikolay Krasko 5a9ea89e9c Collect statistics about used Kotlin formatter 2018-02-03 00:15:45 +03:00
Nikolay Krasko d1e6a61197 Fix testInGlobalPropertyWithGetter test in 173 branch
Workaround for IDEA-185462. It was introduced in 173 idea and
fixed in 181.
2018-02-03 00:15:45 +03:00
Vyacheslav Gerasimov 5b0d908d85 Add log4j & jdom to tests-common testCompile
Fixes NCDFEs in IrBlackBoxCodegenTestGenerated
2018-02-02 19:54:27 +03:00
Ilya Gorbunov c06204d0d4 Remove obsolete test classpath helpers 2018-02-02 17:59:29 +03:00
Ilya Gorbunov 381344141f Drop StdlibTest from compiler tests
Reason: stdlib built with the fresh compiler is going to be tested in Compiler Bootstrap Test configuration.
2018-02-02 17:59:27 +03:00
Ilya Gorbunov 8f78d73cd7 Use fqnames for SortedSet and TreeSet from java.util
Remove internal typealiases for SortedSet and TreeSet
2018-02-02 17:56:56 +03:00
Ilya Gorbunov b456c52902 Import kotlin.coroutines.experimental for generated sequences on all platforms
This will add import to common generated sources
2018-02-02 17:56:56 +03:00
Natalia Selezneva cdbe0b8fa9 Scratch tests: delete scratch file after creation 2018-02-02 17:44:42 +03:00
Natalia Selezneva 6ca1b10f41 Use correct logger for debugging scratch files 2018-02-02 17:44:35 +03:00
Natalia Selezneva 847990a4f6 Tests: call super.teardown from finally block in android tests 2018-02-02 17:44:28 +03:00
Vyacheslav Gerasimov 36167c7b8f Add annotations to lint plugin dependencies
Fixes `warning: unknown enum constant` during lint plugin build
2018-02-02 16:58:43 +03:00
Alexey Tsvetkov 6c4f3df851 Remove intellij-core usages from kotlin-gradle-plugin-integration-tests
We can use only relocated intellij-core from kotlin-compiler-embeddable.
Non-source usages do not resolve in IDE (which also breaks debugger).
2018-02-02 15:40:11 +03:00
Alexey Tsvetkov 8f144fc57a Fix red code in IDE in kotlin-gradle-plugin-integration-tests 2018-02-02 15:40:10 +03:00
Alexey Tsvetkov 7c329b59b6 Shade test jars from compiler used in Gradle tests
This fixes `VerifyError` for all integration tests calling
`KotlinTestUtils.findAndroidSdk()`.
The exception was thrown because `:kotlin-gradle-plugin-integration-tests`
was depending on both relocated intellij-core (from kotlin-compiler-embeddable)
and non-relocated intellij-core (transitevely through tests jars from compiler).

A call to `findAndroidSdk()` was triggering classloading
for `KotlinTestUtils` which had bytecode references to
`org.jetbrains.kotlin.idea.KotlinLanguage` loaded from the embeddable compiler
and to `com.intellij.lang.Language` loaded from non-relocated intellij-core.

`KotlinLanguage` from the embeddable compiler was a subclass of relocated
`org.jetbrains.kotlin.com.intellij.lang.Language` thus it was not
assignable to `com.intellij.lang.Language` causing `VerifyError`.

The solution is to create relocated jar combining the necessary test jars
from the compiler.
2018-02-02 15:40:10 +03:00
Alexey Tsvetkov 7cba035f80 Ensure tasks using android sdk or android jar have proper dependencies
A test task, that uses android dependency but does not depend on
a corresponding configuration, would fail when it was run after
'clean' task.
I've extracted 'useAndroidSdk', 'useAndroidJar' extensions
making it harder for a developer to forget to set up task dependencies.
2018-02-02 15:40:10 +03:00
Anton Bannykh 3ead464671 JS: fix callable reference with implicit extension receiver (KT-22638 fixed) 2018-02-02 14:34:34 +03:00
Alexander Udalov f4e2102787 Minor, remove extra empty lines from -X arguments help 2018-02-01 19:38:32 +01:00
Alexander Udalov 5338df6960 Do not depend on Shadow plugin in subprojects
Since buildSrc depends on the Shadow plugin, it's already in the
classpath of all build scripts
2018-02-01 19:38:31 +01:00
Alexander Udalov ad0cd7c176 Use the same JVM args for buildSrc as for main project 2018-02-01 19:38:30 +01:00
Alexander Udalov f9e195351a Minor, rephrase usage help for -no-stdlib/-no-reflect compiler arguments 2018-02-01 19:38:30 +01:00
Alexander Udalov 28c77bfb01 Fix kotlin.annotation.Target's kdoc
The original sentence was incorrect because it did not exclude type
aliases
2018-02-01 19:27:43 +01:00
Alexander Udalov 616ba1fbe4 Minor, remove obsolete JDK 9 EA version guard 2018-02-01 19:27:43 +01:00
Alexander Udalov efd92547ef Remove unused description file 2018-02-01 19:26:39 +01:00
Vyacheslav Gerasimov dd9ea0bc87 Remove unnecessary dependencies on :prepare:idea-plugin:idea-plugin 2018-02-01 18:11:25 +03:00
Vyacheslav Gerasimov ec511f7a78 Use dependsOn for dependencies on dist & ideaPlugin tasks
instead `shouldRunAfter`
2018-02-01 18:11:25 +03:00
Vyacheslav Gerasimov a595fdd312 Make root dist & ideaPlugin depend on all corresponding tasks in child projects 2018-02-01 18:11:25 +03:00
Alexey Tsvetkov 74e47e024f Replace testCompile with testRuntime dependencies
Compile dependencies broke incremental compilation
because packed compiler was present in idea
test compile classpath (we do not track changes in
fat jars)
2018-02-01 17:39:55 +03:00
Alexey Tsvetkov 4ee34fc355 Avoid building kotlin-compiler-embeddable before running idea tests
kotlin-compiler-embeddable is a runtimeOnly dependency of
kotlin-compiler-runner, so embeddable jar was built
before idea tests execution.
Building the jar takes ~20s on my machine, which is a waste
of time since idea does not use embeddable compiler.
2018-02-01 17:39:55 +03:00
Alexey Tsvetkov 29d2679e8d Do not configure dist task for every published module
This change avoids compiling kotlin-compiler-embeddable,
kotlin-gradle-plugin, and other gradle plugins,
when running `./gradlew dist`
2018-02-01 17:39:55 +03:00
Alexey Tsvetkov d5ee77eb07 Avoid exception when listing configuration contents 2018-02-01 17:39:54 +03:00
Alexey Sedunov f35af11423 Rename: Make improvements for "by-convention" calls
- Convert between conventions call for 'get' and 'invoke'
- Drop 'operator' when converting 'get'/'invoke' to something other than
  'invoke'/'get' respectively

 #KT-12365 Fixed
2018-02-01 15:41:09 +03:00
Alexey Sedunov caeb594e09 Rename: Replace name identifiers via AST to prevent unwanted reformatting
#KT-8563 Fixed
2018-02-01 15:41:06 +03:00
Alexey Sedunov 58bf42c1dd Rename: Support KtTypeAlias in RenameKotlinClassProcessor
#KT-21719 Fixed
2018-02-01 15:41:04 +03:00
Alexey Sedunov 90392a8d8a Loop to Call Chain: Do not generate lambda with double wrapping block
#KT-22476 Fixed
2018-02-01 15:41:03 +03:00
Alexey Sedunov 8c9c1609c0 Move Class to Top Leve: Suggest file name based on new class name
#KT-17977 Fixed
2018-02-01 15:41:01 +03:00
Alexey Sedunov 4d52bf04fe Kotlin Ultimate: Support NodeJS CLI run configuration
#KT-16710 Fixed
2018-02-01 15:35:35 +03:00
Alexey Sedunov 1f7fab837f Gradle: Import production output path for JavaScript modules 2018-02-01 15:35:34 +03:00
Alexey Sedunov 80887a84ca Kotlin Ultimate: Add "Build" action to JS run configurations
#KT-20522 Fixed
2018-02-01 15:35:34 +03:00
Ilmir Usmanov 8ffb205f1c Reformat coroutineContext related code 2018-02-01 13:18:43 +03:00