I am facing constant issues with my build.gradle.kts where the whole thing is basically red since I migrated to kotlin 1.4.20. Also, the gradle version is 6.7.1.
Any one face similar issues or is it just me? any workarounds?
when run through the cli, the build works perfectly fine but in IntelliJ, the whole thing is red
Exception in IntelliJ
java.lang.IllegalArgumentException: declarationDescriptor is null for constructor = TypeVariable(K) with class org.jetbrains.kotlin.resolve.calls.inference.model.TypeVariableTypeConstructor
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt.getJetTypeFqName(descriptorUtils.kt:23)
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt$getJetTypeFqName$typeArgumentsAsString$joinedTypeArguments$1.fun(descriptorUtils.kt:32)
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt$getJetTypeFqName$typeArgumentsAsString$joinedTypeArguments$1.fun(descriptorUtils.kt)
at com.intellij.openapi.util.text.StringUtil.join(StringUtil.java:1337)
at com.intellij.openapi.util.text.StringUtil.join(StringUtil.java:1327)
at com.intellij.openapi.util.text.StringUtil.join(StringUtil.java:1307)
at org.jetbrains.kotlin.js.descriptorUtils.DescriptorUtilsKt.getJetTypeFqName(descriptorUtils.kt:32)
at org.jetbrains.hdfsplugin.highlight.kotlin.KotlinSignatureCondition.getReturnTypeFqn(KotlinSignatureCondition.kt:18)
at org.jetbrains.hdfsplugin.highlight.kotlin.KotlinSignatureCondition.getReturnTypeFqn(KotlinSignatureCondition.kt:8)
at org.jetbrains.hdfsplugin.highlight.SignatureCondition.checkCondition(SignatureCondition.kt:7)
at org.jetbrains.hdfsplugin.highlight.inspection.invalidFormat.InvalidFormatInspection.visitCall(InvalidFormatInspection.kt:13)
at org.jetbrains.hdfsplugin.highlight.inspection.invalidFormat.KotlinHdfsInvalidFormatInspection$buildVisitor$1.visitCallExpression(KotlinHdfsInvalidFormatInspection.kt:15)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitCallExpression(KtVisitorVoid.java:803)
at org.jetbrains.kotlin.psi.KtVisitorVoid.visitCallExpression(KtVisitorVoid.java:21)
at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35)
at org.jetbrains.kotlin.psi.KtElementImpl.accept(KtElementImpl.java:51)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:56)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:296)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$3(LocalInspectionsPass.java:265)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:155)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:147)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:264)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:264)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:117)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:
Try to delete IDEA cache folder:
If it doesn't help, please file an issue in Youtrack.