detekt / detekt-intellij-plugin

detekt plugin for IntelliJ
https://plugins.jetbrains.com/plugin/10761-detekt
Apache License 2.0
299 stars 39 forks source link

Internal IDE Error while opening new project from git #476

Closed IdoFlaxArcual closed 1 year ago

IdoFlaxArcual commented 1 year ago

Expected Behavior

No errors

Observed Behavior

Internal IDE error:

KtAnnotationEntry should always resolve to a KtCallInfo

java.lang.Throwable
    at com.intellij.idea.IdeaLogger.error(IdeaLogger.java:127)
    at org.jetbrains.kotlin.analysis.api.components.KtCallResolver.unresolvedKtCallError(KtCallResolver.kt:91)
    at org.jetbrains.kotlin.analysis.api.components.KtCallResolverMixIn.resolveCall(KtCallResolver.kt:59)
    at org.jetbrains.kotlin.idea.base.searching.KotlinAnnotatedElementsSearcher$Companion$processAnnotatedMembers$result$1.invoke(KotlinAnnotatedElementsSearcher.kt:113)
    at org.jetbrains.kotlin.idea.base.searching.KotlinAnnotatedElementsSearcher$Companion$processAnnotatedMembers$result$1.invoke(KotlinAnnotatedElementsSearcher.kt:98)
    at com.intellij.openapi.application.ActionsKt.runReadAction$lambda$3(actions.kt:19)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:878)
    at com.intellij.openapi.application.ActionsKt.runReadAction(actions.kt:19)
    at org.jetbrains.kotlin.idea.base.searching.KotlinAnnotatedElementsSearcher$Companion.processAnnotatedMembers(KotlinAnnotatedElementsSearcher.kt:98)
    at org.jetbrains.kotlin.idea.base.searching.KotlinAnnotatedElementsSearcher$Companion.processAnnotatedMembers$default(KotlinAnnotatedElementsSearcher.kt:83)
    at org.jetbrains.kotlin.idea.base.searching.KotlinAnnotatedElementsSearcher.execute(KotlinAnnotatedElementsSearcher.kt:46)
    at org.jetbrains.kotlin.idea.base.searching.KotlinAnnotatedElementsSearcher.execute(KotlinAnnotatedElementsSearcher.kt:43)
    at com.intellij.util.ExecutorsQuery.processResults(ExecutorsQuery.java:30)
    at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:88)
    at com.intellij.util.AbstractQuery.delegateProcessResults(AbstractQuery.java:105)
    at com.intellij.util.InstanceofQuery.processResults(InstanceofQuery.java:22)
    at com.intellij.util.AbstractQuery.doProcessResults(AbstractQuery.java:88)
    at com.intellij.util.AbstractQuery.forEach(AbstractQuery.java:80)
    at com.intellij.lang.properties.PropertiesUastReferenceContributor$1.getReferencesForInjectionHost(PropertiesUastReferenceContributor.java:67)
    at com.intellij.psi.UastInjectionHostReferenceProvider.getReferencesByElement(UastInjectionHostReferenceProvider.kt:16)
    at com.intellij.psi.UastReferenceProviderAdapter$getReferencesByElement$1.invoke(UastReferenceProviderAdapter.kt:13)
    at com.intellij.psi.UastReferenceProviderAdapter$getReferencesByElement$1.invoke(UastReferenceProviderAdapter.kt:13)
    at com.intellij.openapi.progress.impl.CancellationCheck.withCancellationCheck(CancellationCheck.kt:59)
    at com.intellij.openapi.progress.impl.CancellationCheck$Companion.runWithCancellationCheck(CancellationCheck.kt:105)
    at com.intellij.psi.UastReferenceProviderAdapter.getReferencesByElement(UastReferenceProviderAdapter.kt:13)
    at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:182)
    at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:163)
    at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:142)
    at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.lambda$getReferencesFromProviders$0(ReferenceProvidersRegistry.java:39)
    at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:158)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:39)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:244)
    at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:244)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:112)
    at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:42)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:245)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:28)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:69)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:155)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:121)
    at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:38)
    at org.jetbrains.kotlin.idea.references.KtIdeReferenceProviderService.getReferences(KtIdeReferenceProviderService.kt:62)
    at org.jetbrains.kotlin.psi.KotlinReferenceProvidersService$Companion.getReferencesFromProviders(KotlinReferenceProvidersService.kt:26)
    at org.jetbrains.kotlin.psi.KotlinReferenceProvidersService.getReferencesFromProviders(KotlinReferenceProvidersService.kt)
    at org.jetbrains.kotlin.psi.KtElementImplStub.getReferences(KtElementImplStub.java:113)
    at com.intellij.codeInsight.highlighting.HyperlinkAnnotator.annotate(HyperlinkAnnotator.java:42)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:130)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:107)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:348)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$7(GeneralHighlightingPass.java:281)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:308)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:311)
    at org.jetbrains.kotlin.idea.highlighter.AbstractKotlinHighlightVisitor.analyze(AbstractKotlinHighlightVisitor.kt:49)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$8(GeneralHighlightingPass.java:311)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:92)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:278)
    at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:226)
    at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:97)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1102)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:374)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:373)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:349)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:229)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:187)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:347)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)

Steps to Reproduce

New project from version control

Context

Your Environment

BraisGabin commented 1 year ago

How is this related to detekt?

IdoFlaxArcual commented 1 year ago

Intellij said the issue was coming from detekt

BraisGabin commented 1 year ago

Moving to the intellij plugin repo as this isn't related with detekt itself.

arturbosch commented 1 year ago

Duplicate of #271