Commit Graph

57435 Commits

Author SHA1 Message Date
Ilya Goncharov 48c06aeeba Add test for yarn setup by kotlinYarnSetup task 2019-09-10 10:44:30 +03:00
Ilya Goncharov f609e21c82 Remove asserts, that failed build
- TeamCity cannot run browser tests yet, so disable such assertions related with browser tests checking

#KT-32075 fixed
2019-09-10 10:39:11 +03:00
Ilya Goncharov 49391e64d6 Add testing for karma use puppeteer for downloading chrome 2019-09-10 10:35:31 +03:00
Ilya Goncharov 18f2ba889e Make envJsCollector as map 2019-09-10 10:35:30 +03:00
Ilya Goncharov 3bfb980a39 Collect env variables to separate collector 2019-09-10 10:35:30 +03:00
Ilya Goncharov 613391d00b Add puppeteer for Chrome browsers 2019-09-10 10:35:30 +03:00
Ilya Goncharov df646233ef Fix KarmaConfig file name 2019-09-10 10:35:30 +03:00
Vasily Levchenko 89d49479ab [util-io][properties] close file stream after save property operation ends.
(cherry picked from commit f0ae971f9304ecd7a2ba134ab77b511a0569ed5f)
2019-09-09 21:14:19 +03:00
Sebastian Schuberth cc40387788 YarnSetupTask: Remove a too coarse "onlyIf" in the "init" block
"installationDir" is the non-version specific top-level Yarn
installation directory simply called "yarn". Checking for its existence
is not sufficient to be able to skip the task, as another version than
the requested one could be installed below the "yarn" directory.

Instead of taking the version into account in this check, simply remove
it as the version-specific installation directory at "env.home" is
already marked as an "OutputDirectory", so Gradle itself already takes
care of skipping task execution if the output files were created before.
2019-09-09 17:03:17 +03:00
Mikhail Zarechenskiy 85ff979bd4 Use PARTIAL mode in analyzer to provide lambda return value hints
It only uses `isUsedAsResultOfLambda` (so, CFA) and don't have to
 resolve bodies fully
2019-09-09 15:22:41 +03:00
Nikolay Krasko d253cd5032 Ignore external annotations in AbstractResolveByStubTest (KT-33732)
In IDE with have descriptors with additional annotations obtained from
external annotations manager. They are probably only java overrides so
shouldn't be present in stubs, thus must be ignored in this test.

Tests with enums started to fail after upgrading to 192 platform because
of additional NotNull annotation on `getDeclaringClass()` method.

 #KT-33732 Fixed
2019-09-09 14:35:58 +03:00
Nikolay Krasko 80b5c76d98 Minor: fix warnings in AbstractResolveByStubTest 2019-09-09 14:35:58 +03:00
Kristoffer Andersen e7d0909979 JVM_IR: Fix null-constant comparison with primitive types. 2019-09-09 10:23:11 +02:00
Mikhail Zarechenskiy e21da3a61a Avoid resolving array-set method several times
While origin problem was in NI, it's also nice to have this change in OI
 in order to slightly improve performance

 #KT-33125 Fixed
2019-09-09 11:04:18 +03:00
Mikhail Zarechenskiy f8449bf15a [NI] Clear partially resolved calls after resolve of top-level call
#KT-32433 Fixed
2019-09-09 11:04:17 +03:00
Mikhail Zarechenskiy f305475e3f Make "nothing to inline" diagnostic shorter
#KT-33421 Fixed
2019-09-09 11:04:17 +03:00
Mikhail Zarechenskiy dc25f7b7ac [NI] Minor, remove unneeded computation of constant evaluator 2019-09-09 11:04:16 +03:00
Denis Zharkov 3569eaabcf Rename FirJavaElementFinder.kt.as34 to FirJavaElementFinder.kt.183 2019-09-09 10:14:19 +03:00
Steven Schäfer 62a1ea643a Add additional tests for bound receivers in callable references 2019-09-06 15:11:59 +02:00
Steven Schäfer d89d68e3df JVM IR: Cache SAM wrappers in top-level classes and use proper naming scheme 2019-09-06 15:11:59 +02:00
Steven Schäfer 2be4abe9a6 Refactoring: Consistently use Symbols in JvmSymbols 2019-09-06 15:11:59 +02:00
Steven Schäfer c77fa1ecd6 JVM IR: Fixes in SAM lowering 2019-09-06 15:11:59 +02:00
Denis Zharkov 829102b3e3 FIR: Fix exception in inference
Default SimpleTypeMarker::withNullability from ConeTypeContext
doesn't take into account inference-related type kinds like type variables

These cases are properly handled in
org.jetbrains.kotlin.fir.resolve.ResolveUtilsKt#withNullability

Original exception trace:
	at org.jetbrains.kotlin.fir.types.ConeTypeContext$DefaultImpls.withNullability(ConeTypeContext.kt:142)
	at org.jetbrains.kotlin.fir.resolve.calls.ConeInferenceContext$DefaultImpls.withNullability(ConeInferenceContext.kt)
	at org.jetbrains.kotlin.fir.resolve.transformers.FirBodyResolveTransformerKt$inferenceComponents$1.withNullability(FirBodyResolveTransformer.kt:943)
	at org.jetbrains.kotlin.fir.resolve.calls.ConeInferenceContext$DefaultImpls.makeSimpleTypeDefinitelyNotNullOrNotNull(ConeInferenceContext.kt:195)
	at org.jetbrains.kotlin.fir.resolve.transformers.FirBodyResolveTransformerKt$inferenceComponents$1.makeSimpleTypeDefinitelyNotNullOrNotNull(FirBodyResolveTransformer.kt:943)
	at org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl.makeSimpleTypeDefinitelyNotNullOrNotNull(NewConstraintSystemImpl.kt)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector$TypeCheckerContext.makeSimpleTypeDefinitelyNotNullOrNotNull(ConstraintInjector.kt)
	at org.jetbrains.kotlin.resolve.calls.inference.components.AbstractTypeCheckerContextForConstraintSystem.simplifyLowerConstraint(AbstractTypeCheckerContextForConstraintSystem.kt:163)
	at org.jetbrains.kotlin.resolve.calls.inference.components.AbstractTypeCheckerContextForConstraintSystem.internalAddSubtypeConstraint(AbstractTypeCheckerContextForConstraintSystem.kt:71)
	at org.jetbrains.kotlin.resolve.calls.inference.components.AbstractTypeCheckerContextForConstraintSystem.addSubtypeConstraint(AbstractTypeCheckerContextForConstraintSystem.kt:50)
	at org.jetbrains.kotlin.types.AbstractTypeChecker.completeIsSubTypeOf(AbstractTypeChecker.kt:193)
	at org.jetbrains.kotlin.types.AbstractTypeChecker.isSubtypeOf(AbstractTypeChecker.kt:164)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector$TypeCheckerContext.runIsSubtypeOf(ConstraintInjector.kt:153)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector.addSubTypeConstraintAndIncorporateIt(ConstraintInjector.kt:77)
	at org.jetbrains.kotlin.resolve.calls.inference.components.ConstraintInjector.addInitialSubtypeConstraint(ConstraintInjector.kt:55)
	at org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl.addSubtypeConstraint(NewConstraintSystemImpl.kt:84)
	at org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderKt$addSubtypeConstraintIfCompatible$1.invoke(ConstraintSystemBuilder.kt:61)
	at org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderKt$addSubtypeConstraintIfCompatible$1.invoke(ConstraintSystemBuilder.kt)
	at org.jetbrains.kotlin.resolve.calls.inference.model.NewConstraintSystemImpl.runTransaction(NewConstraintSystemImpl.kt:130)
	at org.jetbrains.kotlin.resolve.calls.inference.ConstraintSystemBuilderKt.addSubtypeConstraintIfCompatible(ConstraintSystemBuilder.kt:60)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.checkApplicabilityForArgumentType(Arguments.kt:170)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolvePlainArgumentType(Arguments.kt:158)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolveSubCallArgument(Arguments.kt:123)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolveArgumentExpression(Arguments.kt:42)
	at org.jetbrains.kotlin.fir.resolve.calls.ArgumentsKt.resolveArgument(Arguments.kt:196)
	at org.jetbrains.kotlin.fir.resolve.calls.CheckArguments.check(ResolverParts.kt:145)
	at org.jetbrains.kotlin.fir.resolve.calls.CheckArguments$check$1.invokeSuspend(ResolverParts.kt)
2019-09-06 13:45:28 +03:00
Denis Zharkov 8c52ff31b3 Add bunch for AS34: FirJavaElementFinder 2019-09-06 13:45:28 +03:00
Denis Zharkov 3f0887dc0c FIR: Do not try building light classes for invalid names 2019-09-06 13:45:28 +03:00
Denis Zharkov 106b6c901d FIR: Get rid of FirRegularClass::setCallbackOnSupertypesComputed 2019-09-06 13:45:28 +03:00
Denis Zharkov 122c229a8b FIR: Add possibility to run SupertypeResolverTransformer ad-hoc 2019-09-06 13:45:28 +03:00
Denis Zharkov d9d6c38c2b FIR: Introduce FirClassLikeDeclaration::supertypesComputationStatus 2019-09-06 13:44:32 +03:00
Denis Zharkov 6058f9d286 FIR: Avoid recursions while building Java enhancement scopes 2019-09-06 13:44:32 +03:00
Denis Zharkov 7f5c4d90fd FIR: make "collectSuperTypes" recursion-resistant 2019-09-06 13:44:32 +03:00
Denis Zharkov 1f23184db9 FIR: Get rid of code duplication in SupertypesUtils.kt 2019-09-06 13:44:32 +03:00
Denis Zharkov bf610323cf Support basic light-classes basic with FIR for CLI 2019-09-06 13:44:32 +03:00
Steven Schäfer e7410348a7 JVM IR: Fix visibility for @InlineOnly functions 2019-09-06 12:12:58 +02:00
Steven Schäfer ee45933e33 JVM IR: Create local classes in PropertyReferenceLowering
In particular, we should not cache classes or instances for property
references, since they may be used inside of inline funtions. This also
allows us to mark the $$delegatedProperties array as package private.
2019-09-06 12:12:58 +02:00
Steven Schäfer 626f4c94f6 Handle special case visibility rules in LocalDeclarationsLowering 2019-09-06 12:12:58 +02:00
Roman Golyshev 9a938b07ba KT-17689: Fix TypeAliasQualifier to provide enum entries descriptors
- this adds enum entries to the completion on the typealiases
- we cannot use `unsubstitutedInnerClassesScope` instead of `EnumEntriesScope` because it allows to complete things that are not allowed to be resolved by the Kotlin compiler; see `EnumEntriesScope` doc for details
- ^KT-17689 Fixed
2019-09-06 12:11:23 +03:00
Roman Golyshev f419d2eb30 KT-33585: Add synchronization between scratch editor and preview
- fix problem with not working shortcuts in the preview window by passing more params into view editor creation
2019-09-06 12:03:35 +03:00
Roman Golyshev d12d9d86bc KT-33585: Refactor KtsScratchFileEditorWithPreview and its output handlers
- now `PreviewOutputBlocksManager` is injected into `PreviewEditorScratchOutputHandler`, so `KtsScratchFileEditorWithPreview` can use it too
2019-09-06 11:36:37 +03:00
Nikolay Krasko edb700b898 Switch to 192 platform 2019-09-06 11:28:25 +03:00
Dmitry Gridin 650a6e5cc4 MakeOverriddenMemberOpenFix: should update actual members
#KT-32586 Fixed
2019-09-06 15:25:01 +07:00
Dmitry Gridin 58d303afcc MakeOverriddenMemberOpenFix: cleanup code 2019-09-06 15:25:01 +07:00
Natalia Selezneva 3f451d7eaf Switch off SAM adapter conversion for constructors in completion
It is very slow in completion for build.gradle.kts because it creates SAM adapters for constructors of all imported classes
Note that those SamAdapters weren't shown in completion in any case because they were filtered by name filter (SamAdapters for constructors have <init> name)
2019-09-06 10:53:16 +03:00
Natalia Selezneva f7b8c7f76e Check that project isn't disposed showing notification for scripts
EA-209612 - (Scripting, Notification) assert: ComponentManagerImpl.lambda$throwAlreadyDisposed$
2019-09-06 10:53:15 +03:00
Natalia Selezneva fb01f7be5e Rename ScriptDependenciesManager to ScriptConfigurationManager 2019-09-06 10:52:59 +03:00
Natalia Selezneva fa6b5b567b Fix org.jetbrains.kotlin.idea.script.ScriptConfigurationHighlightingTestGenerated.Highlighting.testThrowingResolver 2019-09-06 10:52:30 +03:00
Natalia Selezneva 961e8c2c74 Refactor the mechanism how script configurations are updated
Introduce file attributes cache, which is only applicable when no dependencies are cached in memory cache
Refactor ScriptDependenciesCache to memory cache that is able to get configuration from cache and checks if it is up to date
Move all public methods to ScriptDependenciesManager
Introduce ScriptClassRootsManager that checks if root change event should be called after script configuration update
2019-09-06 10:52:17 +03:00
Natalia Selezneva dc46f73ecf Rewrite scripting related API to PsiFile instead of VirtualFile
There were several places where we converted virtualFile to PsiFile. This operation need a read access and may throw ProcessCanceledException,
so we want to minimize its usages in IDE
2019-09-06 10:51:26 +03:00
Sergey Rostov 5b48dcca4f ResultWithDiagnostics: remove unused equals and hashCode
They are overridden by sealed data classes
2019-09-06 09:33:33 +03:00
Mikhail Glukhikh 91f39a0ecf FIR [optimization]: eliminate some unnecessary ScopeSessions 2019-09-06 09:29:19 +03:00
Georgy Bronnikov 7ede26e8f4 IrCompileKotlinAgainstInlineKotlin tests 2019-09-06 09:19:57 +03:00