Commit Graph

57826 Commits

Author SHA1 Message Date
Alexander Podkhalyuzin cdebd6bc05 Fixed testdata as Enter shouldn't override completion 2019-09-26 16:25:50 +03:00
Alexander Podkhalyuzin 66bed85176 Fixed testdata for new inference 2019-09-26 16:25:50 +03:00
Alexander Podkhalyuzin d018489621 Fixed testdata
JS stdlib contains more classes now, so we need to filter them out
2019-09-26 16:25:50 +03:00
Dmitry Gridin 57d25fc5f5 Create actual: add type accessibility checker
#KT-28740 Fixed
2019-09-26 20:21:54 +07:00
Dmitry Gridin fcaa897b9f Tests: extract addMissingActualMembers from multiModuleQuickFix/other 2019-09-26 20:21:54 +07:00
Dmitry Gridin a552f06526 Create expect/actual: improve error hint message
#KT-33754 Fixed
2019-09-26 20:21:54 +07:00
Dmitry Gridin 773e4764b1 TypeAccessibilityCheckerImpl: fix incorrectTypes for KtNamedDeclaration 2019-09-26 20:21:54 +07:00
Natalia Selezneva a3f4effe3e Fix testdata for IdeLightClassTestGenerated.Script after scripting API refactoring
Generated script class no longer has a supertype
2019-09-26 14:24:47 +03:00
Ilya Chernikov 3430a21fa1 Add test to the scripting fixes for maven plugin
tests KT-34011 and KT-34006 fixes
2019-09-26 11:46:55 +02:00
Ilya Chernikov 517e5e8954 Fix loading scripting plugin from the current classloader
previous code was completely wrong - wrong package and wrong procedure
#KT-34011 fixed
2019-09-26 11:46:55 +02:00
Ilya Chernikov a1118ce209 Do not skip maven compilation if sources contain .kts files but no .kt files
#KT-34006 fixed
2019-09-26 11:46:55 +02:00
Ilya Chernikov c53a805696 [minor} Refactor scripting host tests:
- move definitions into one place
- reduce script/repl compilation classpath - spedd-ups tests (~10%)
2019-09-26 07:16:24 +02:00
Ilya Chernikov 0a1aff4f80 Do not add updated script classpath to the compilation configuration
it is added via the updateClasspath call with proper duplicates control
2019-09-26 07:16:24 +02:00
Ilya Chernikov 256d3a79e4 [minor] refactor and extend script dependencies resolving tests 2019-09-26 07:16:23 +02:00
Ilya Chernikov bda2e46697 [minor] Fix classpath from class calculation utility for classes dir 2019-09-26 07:16:23 +02:00
Svyatoslav Kuzmich 7592048437 [JS] Support typeOf 2019-09-25 18:12:55 +03:00
Vyacheslav Gerasimov c1e1dbd83e Build: Fix usages of "java.home" for tools.jar dependency
#KT-33984
2019-09-25 17:54:18 +03:00
Abduqodiri Qurbonzoda eae6fbad3a Document String.contentEquals overloads difference 2019-09-25 17:43:45 +03:00
Vyacheslav Gerasimov 71416f9dbf Build: Make internalKotlinRepo url independent from bootstrap 2019-09-25 15:58:49 +03:00
Vyacheslav Gerasimov 60dc52f364 Build: Use cacheRedirector flag for bootstrap 2019-09-25 15:58:49 +03:00
Vyacheslav Gerasimov 9e495f8810 Build: Use bootstraps from kotlin-bootstrap repository 2019-09-25 15:58:49 +03:00
Vyacheslav Gerasimov 1b5417e422 Minor: Build use cache-redirector for bootstrap repos 2019-09-25 15:58:49 +03:00
Vyacheslav Gerasimov ed59741e14 Minor: Reformat 'buildSrc/src/main/kotlin/Bootstrap.kt' 2019-09-25 15:58:49 +03:00
Vyacheslav Gerasimov b7ebe17fe0 Build: Add kotlin-bootstrap repository to bootstrap options 2019-09-25 15:58:49 +03:00
Natalia Selezneva dd85dcc1c7 193: Do not modify registry property since the default changed in 193
Review in IDEA: IDEA-CR-51492
2019-09-25 15:54:04 +03:00
Natalia Selezneva 153339bc26 193: Remove Gradle Kotlin DSL template because they are provided by Gradle Plugin (since 193)
^IDEA-219018
2019-09-25 15:54:04 +03:00
Vladimir Dolzhenko 750a677366 Register manually IDEKotlinBinaryClassCache for AbstractLoadJavaClsStubTest.kt 2019-09-25 14:49:17 +02:00
Sergey Igushkin ece7a3e70e Add extensions with explicit Class<*> instance for Kotlin DSL, KT-31077 2019-09-25 15:46:07 +03:00
Sergey Igushkin 3abb1b3f40 Fix lint task in Android projects depending on MPP, KT-27170 2019-09-25 15:46:06 +03:00
Sergey Igushkin 032686ebe0 Fix kapt class structure configuration not resolving MPP deps, KT-33105 2019-09-25 15:46:06 +03:00
Sergey Igushkin 3deff3b347 Fix Kapt configuration not resolving MPP deps to JVM variants, KT-31641 2019-09-25 15:46:06 +03:00
Sergey Igushkin f2d2fb9e6b Fix Kapt-generated sources not compiled by jvm.withJava(), KT-32804
Given that the Kapt subplugin creates new tasks, it is impossible
to run it in the context of lazy task configuration. Disable lazy
task configuration for Kotlin/JVM by always accessing the task
instance until subplugins are refactored to be able to properly
work with task configuration avoidance.
2019-09-25 15:46:05 +03:00
Sergey Igushkin 0456220f7a Fix issues found in KOTLIN-CR-3233 2019-09-25 15:46:05 +03:00
Sergey Igushkin f0ef5a90b3 Add an integration test for the test runs API
Issue #KT-32679
2019-09-25 15:46:05 +03:00
Sergey Igushkin d1016f0221 Reimplement friend task/friend paths using associated compilations
Replace the old ad-hoc task matching mechanism used for connecting the
compilation tasks that need to share internal visibility with an
implementation based on the associate compilations and compilation
outputs rather than `destinationDir`s of the tasks.

The only place that still requires ad-hoc friend paths is the Android
instrumented tests compiling against the JAR of the main variant, not
its classes dirs. Support that with `friendArtifacts`.

Issue #KT-17630 Fixed
Issue #KT-20760 Fixed
2019-09-25 15:46:05 +03:00
Sergey Igushkin c4d9c4cee4 Group associated compilations into modules with a single module name
As associated compilations will see internals of each other, they now
need to share the module name for the compiler to be able to correctly
generate calls to the internals.

Move `moduleName` to `KotlinCompilation`.

Group associate compilations into modules in a DSU-like way, use a
single module name for all of the compilations grouped into a module.
2019-09-25 15:46:04 +03:00
Sergey Igushkin 94fd5c2884 Implement source sets visibility inference via associate compilations
Add non-public API for the IDE to query additional visible source sets
for each source set.
Implement visibility inference via associate compilation links.
Implement visibility requirements for source sets and requirements
satisfaction checks in Gradle build.
2019-09-25 15:46:04 +03:00
Sergey Igushkin 8c1c687e92 Implement associate compilations, KT-34009
Partial implementation of the associate compilations proposal. A
compilation can now contain links to other compilation that it compiles
against. This links will replace ad-hoc inter-compilation dependencies.

Issue #KT-34009 Fixed
2019-09-25 15:46:04 +03:00
Sergey Igushkin bb6f406be4 Partial cleanup & refactoring of the Android plugin
The `KotlinAndroidPlugin` used to support two different sets of APIs of
the Android Gradle plugin and used `AbstractAndroidProjectHandler` to
wrap those APIs. Now that there's only one implementation, it
doesn't need the generic `V` (variant data), and some cleanup is needed.
2019-09-25 15:46:03 +03:00
Sergey Igushkin 0e59553d12 Add Kotlin & Java destination dirs as output of Android compilation
The compilation outputs of Android compilations accidentally were left
empty. The `destinationDir`s of the Kotlin & Java tasks should be
registered in the `output.classesDirs`.
2019-09-25 15:46:03 +03:00
Sergey Igushkin 9836a1ca4a Make compilationsBySourceSets safe to use during evaluation
This function used to only calculate the mapping once and store it for
the project, so it was unsafe to use early. Fix that by evaluating the
value each time and then freezing it at the point of either task graph
being ready, or any task being executed.

Also, store the map in the project's `ext` rather than in a static weak
hash map, which is safer wrt memory leaks.
2019-09-25 15:46:03 +03:00
Sergey Igushkin 5dd4e0ed42 Track the compilation outputs as inputs of Gradle JS test tasks, KT-33313
Issue #KT-33313 Fixed
2019-09-25 15:46:02 +03:00
Sergey Igushkin 3011a3cf81 Create objects via Gradle ObjectFactory to allow access from Groovy 2019-09-25 15:46:02 +03:00
Sergey Igushkin fe50029beb Adjust task output detection for Gradle 4.9 2019-09-25 15:46:02 +03:00
Sergey Igushkin 43c3122a13 Drop Gradle versions older than 4.9
* Replace `TaskHolder` with `TaskProvider`, remove `TaskHolder`
* Migrate Gradle integration tests to Gradle 4.9+
2019-09-25 15:46:01 +03:00
Sergey Igushkin 9f0c5675bd Introduce execution & test run API, KT-32679
* KotlinExecution
* KotlinExecutionSource
* KotlinTestRun
* Aggregating executions and execution sources
* KotlinTargetWithTests

* Add a `testableTargets` extension
* Make some Kotlin/Native targets testable (this requires
  having a separate preset type for them)
* Implement test runs encapsulating the tests for all
  existing testable targets by refactoring their
  TargetConfigurator classes

Issue #KT-32679 Fixed
2019-09-25 15:46:01 +03:00
Pavel Kirpichenkov 6c8e829f19 Update diagnostics for trailing lambdas, add quickfix
Alternative message for errors, caused by unexpected lambda expression arguments on a new line.
Both diagnostic are reported, if multiple lambda expressions were passed to the call.
For other errors trailing lambda diagnostic overrides the original one.

Quickfix for erroneous trailing lambdas on a new line after call.
Fix separates lambda expression from previous call with semicolon.
All trailing lambda arguments become standalone lambda expressions.
2019-09-25 15:38:17 +03:00
Nikolay Krasko f00d609459 Fix KotlinConfidenceTest tests 2019-09-25 14:06:36 +03:00
Ivan Gavrilovic f89885224e Add tests for running incremental KAPT on JDK9
Add test for aggregating incremental annotation processors and JDK9.
This makes sure the implementation is not using any types that have
been removed in JDK 9.
2019-09-25 19:21:10 +09:00
Ivan Gavrilovic 4da6675640 Do not depend on BaseFileObject type for incremental KAPT
This class does not exist in JDK9, so running incremental KAPT on
JDK9 fails. Because it is used only to get the name of the file,
this has been replaced with usage of the public JavaFileObject API.
2019-09-25 19:21:10 +09:00