"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.
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
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)
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.
- 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
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)
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
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