Commit Graph

22721 Commits

Author SHA1 Message Date
Alexander Podkhalyuzin 5bb74d9840 Fixed generated text from jvm classfile, when quotes is required
#KT-34759 Fixed
2020-03-11 15:41:41 +03:00
Dmitriy Novozhilov 36ec0a2e2e [FIR-TEST] Move FIR ide tests to separate module 2020-03-11 15:12:04 +03:00
Dmitriy Novozhilov 78f910e321 Regenerate tests 2020-03-11 15:12:04 +03:00
Vladimir Dolzhenko 8af5e2bb04 Make copy-paste resolve task modal to avoid invalid psi elements
Due to background formatting pasted PSI elements become invalid quite soon and it is not possible to make resolve

#KT-37414 Fixed
2020-03-11 11:53:03 +01:00
Roman Golyshev 90750483ee KT-36860 Collect extensions from object on first completion
- This should not affect the performance of the completion, since all
object extensions are collected on the last step, when all main variants
are already collected
- Add more tests
- Also, disable completion of extensions from objects as callable
references (^KT-37395 Fixed)
- ^KT-36860 Fixed
2020-03-11 13:31:56 +03:00
Vyacheslav Gerasimov a0b82c4dec Build: Compile against tollsJarApi in idea-jvm & jvm-debugger-coroutine 2020-03-10 17:24:21 +03:00
Vyacheslav Gerasimov f735396ffb Build: Make toolsJarApi() helper for JPS build 2020-03-10 17:24:21 +03:00
Vyacheslav Gerasimov ef169aa12b Build: Use preprocessed tools.jar for compilation
tools.jar from JDK has different public api on different platforms which
makes impossible to reuse caches for tasks which depend on it. Since we
can't compile against those classes & stay cross-platform anyway, we
may just exclude them from compile classpath. This should make tools.jar
compatible at least within one build of JDK for different platforms
2020-03-10 17:24:21 +03:00
Ilya Goncharov ae6a603a92 [Gradle, JS] Fix for produceExecutable in Groovy build script 2020-03-10 17:01:40 +03:00
Alexander Udalov 795d6ab407 Migrate UseExperimental->OptIn in project sources 2020-03-10 12:07:14 +01:00
Toshiaki Kameyama 77f85d8b7c Move to top level: update import directives on the usage site when the declaration to be moved is not private
#KT-37213 Fixed
2020-03-10 10:28:23 +01:00
Vladimir Dolzhenko ddba8e7691 Extend incremental analysis to object declaration
Fixed #KT-37250
2020-03-10 09:08:47 +01:00
Alexander Udalov 98aecbef6b Optimize runtime representation for callable reference subclasses
Instead of generating overrides for getOwner/getName/getSignature in
each anonymous class representing a callable reference, pass them to the
superclass' constructor and store as fields. This occupies some small
memory but helps to reduce the size of the generated class files, and
will be helpful for adding further runtime information to callable
references, such as information about implicit conversions this
reference has been subject to.

Represent owner as java.lang.Class + boolean instead of
KDeclarationContainer, so that the unnecessary wrapping Class->KClass
wouldn't happen before it's needed, and also to make sure all callable
references remain serializable.

Note that the argument type where the "is declaration container a class"
is passed is int instead of boolean. The plan is to pass the
aforementioned implicit conversion information as bits of this same
integer value.

 #KT-27362 Fixed
2020-03-06 16:55:07 +01:00
Natalia Selezneva 04c924a119 Remove idea-gradle-tooling-api.jar from IDEA 2020
Because gradle-6.1.jar is now bundled into idea-gradle plugin
2020-03-06 14:59:20 +03:00
Natalia Selezneva 33368590e4 KotlinDslScriptsModelResolver: return back requireTaskRunning override
It is required for collecting KotlinDslScriptsModels because we need to run `prepareKotlinBuildScriptModel` task before
2020-03-06 14:59:20 +03:00
Natalia Selezneva d063dbef10 Drop modification stamps for gradle scripts after project import
^KT-36763 Fixed
2020-03-06 14:59:19 +03:00
Vladimir Dolzhenko dc6be68a41 Handle properly lambda change in incremental analysis
Fixed #KT-37273
2020-03-06 11:12:33 +01:00
Alexander Podkhalyuzin b6b0819f40 Revert "Since build updated for 193 branch due incompatibility"
This reverts commit 135ae32f
2020-03-06 10:30:49 +03:00
Alexander Podkhalyuzin 135ae32f75 Since build updated for 193 branch due incompatibility 2020-03-06 10:19:04 +03:00
Dmitriy Dolovov 17152899ac IDE perf tests for K/N: Produce duplicated *.kt files on demand 2020-03-06 10:14:54 +07:00
Dmitriy Dolovov 44c8a85241 IDE perf tests for K/N: Don't run tests on inapplicable host OSes 2020-03-06 10:14:47 +07:00
Dmitriy Dolovov 8635045a53 IDE perf tests for K/N: add more tests (Linux, AndroidNative) 2020-03-06 10:14:41 +07:00
Dmitriy Dolovov 80f2c091b4 IDE perf tests for K/N: keep Kotlin & Gradle versions in *.properties 2020-03-06 10:14:34 +07:00
Dmitriy Dolovov c4a89c0201 IDE perf tests for K/N: check successful Gradle project import 2020-03-06 10:14:28 +07:00
Dmitry Savvinov 8fcd98639d Minor: merge HierarchicalExpectActualMatchingTests into MultiplatformHighlightingTests 2020-03-05 17:27:19 +03:00
Konstantin Tskhovrebov 9eab75650c Remove target name from gradle test filters.
Issue #KT-36909 Fixed
2020-03-05 17:14:49 +03:00
Vladimir Dolzhenko d1a29df581 Revert "Added AllowNullableArrayArgsInMain (1.4+) language setting"
#KT-35965 Fixed
2020-03-05 14:08:27 +01:00
Vladimir Dolzhenko 0be5a82460 Use LightJavaModule.getModule for 193
Fixed #KT-37229
2020-03-04 15:30:09 +01:00
Mikhael Bogdanov a795c38eb7 Introduce base class for codegen and diagnostic tests
Extract base TestFile and TestModule classes.
 Move coroutinePackage related logic to base class
2020-03-04 14:51:10 +01:00
Vladimir Dolzhenko 15e2afe5ab Add checkCanceled on common for autocompletion and highlighting resolve path 2020-03-04 08:59:17 +01:00
Vladimir Dolzhenko 9c530b1121 Add performance stress tests 2020-03-04 08:47:51 +01:00
Dmitry Gridin b4898e4043 Put arguments/parameters on separate/one line should update trailing comma
#KT-36411 Fixed
2020-03-03 21:53:11 +07:00
Dmitry Gridin 173f90c89c AbstractIntentionTest: support code style and registry settings 2020-03-03 21:53:11 +07:00
Dmitry Gridin baf2dd6b9b KotlinLightCodeInsightFixtureTestCase: add configureCodeStyleAndRun 2020-03-03 21:53:11 +07:00
Yan Zhulanow 390d062721 Fix class run configuration applicability (KT-33787)
The bug appeared when we turned “ultra light classes” on by default.
  The difference with the old implementation is that
  PsiClass.getTextRange() returns the correct non-null value.
  This triggers JavaExecutionUtil#stepIntoSingleClass() to return
  a light class instead of the original location (of a PsiIdentifier).
  So AbstractJavaTestConfigurationProducer#isConfigurationFromContext()
  returns true, and the wrong configuration is reused instead of
  creating the new one.

By the way, for Java it also returns an identifier because of the
  PsiTreeUtil.getParentOfType(element, PsiClass.class) != null check.

The proper fix should land in the newer versions of IDEA, however this
  (hopefully, temporary) hack will fix test method gutters for
  all platform versions.
2020-03-03 14:18:04 +09:00
Yan Zhulanow b360fb5119 Revert "Import Kotlin JUnit run configuration settings from Gradle" 2020-03-03 14:18:03 +09:00
Yan Zhulanow 29566723b8 Partially revert "Prefer Kotlin Gradle test run configurations when possible (KT-33787)"
This commit reverts 987307cf92.
Tests are left behind as the different fix will be provided for KT-33787.
2020-03-03 14:18:03 +09:00
Yan Zhulanow 9016a573ca Partially revert "Prefer Kotlin Junit test run configurations when possible (KT-33787)"
This commit reverts parts of ef8b3cb72a.
Tests are left behind as the different fix will be provided for KT-33787.
2020-03-03 14:18:03 +09:00
Nikolay Krasko 208c7274dd Disable parallel execution for gradle tests 2020-03-02 23:21:46 +03:00
Natalia Selezneva c0cd010b7d .gradle.kts: fix freezes by avoiding fs walking
^KT-36502 Fixed
2020-03-02 20:48:55 +03:00
Dmitry Gridin ecb7478794 ExperimentalFixesFactory: OptIn shouldn't be added for old version
#KT-36478
2020-03-03 00:09:00 +07:00
Nikolay Krasko 08dc03a704 201: Fix refineSignaturesWithResolve failure for primary constructors 2020-03-02 18:25:29 +03:00
Nikolay Krasko 096ff0e8a9 201: Enable mute in KotlinSuggestedRefactoringChangeListenerTest 2020-03-02 18:25:29 +03:00
Dmitry Savvinov e6885323da Accept incorrect behaviour for run-config tests for AS
Short description.
It's a corner-case with old MPP plugins and AS, so we
don't care too much that it works incorrectly, but we'd like to avoid
muting it in order to keep track of this "known issue"

Long description.
In IDEA, KotlinJvmTestMethodGradleConfigurationProducer successfully
returns run configuration; in AS, it fails to do so.

This is becasuse it doesn't override 'forceGradleRunner', which means
that in 'setupConfigurationFromContext' we'll delegate to super-call,
which will pull 'GradleProjectSettings.getTestRunner()'.

In IDEA, it will return GRADLE, but in AS it will return PLATFORM,
because AS uses special instance of GradleProjectSettings which forces
runner to PLATFORM.

Note that KotlinMultiplatformJvmTestMethodGradleConfigurationProducer
does override 'forceGradleRunner' to true, that's why other tests work
successfully. However, this test uses old 1.2.X-MPP plugins, therefore
all new KotlinMultiplatform*ConfigurationProducers won't work here.\
2020-03-02 16:40:15 +03:00
Konstantin Tskhovrebov 60d592716d Disable KotlinMppTestLogger for non test executions.
Issue #KT-36716 Fixed
2020-03-02 13:41:33 +03:00
Konstantin Tskhovrebov 35055d1895 Fix empty run actions in context menu for non-JVM test results.
Issue #KT-36910 Fixed
Issue #KT-36909 Fixed
2020-03-02 12:25:36 +03:00
Vladimir Ilmov dc8f24b8bc Revert "Registry key to show hidden variables in debugger."
This reverts commit f5e6001d82.
2020-03-02 08:35:09 +01:00
Mikhail Glukhikh 1bad380381 FIR: fix test data in IDEA multi-module tests 2020-03-02 10:03:49 +03:00
Dmitriy Novozhilov 4454a0681b [FIR] Get rid of copying function call in process of completion 2020-03-02 09:49:28 +03:00
Toshiaki Kameyama 266149b88c RedundantLetInspection: fix false positive with nullable receiver extension call
#KT-31601 Fixed
2020-03-02 10:21:47 +07:00