jlagerweij / cucumber-kotlin

Jetbrains plugin for Cucumber step definitions written in Kotlin
https://plugins.jetbrains.com/plugin/10527-cucumber-for-kotlin
Other
20 stars 16 forks source link

Kotlin resolution encountered a problem while analyzing KtNameReferenceExpression #47

Open baumar opened 11 months ago

baumar commented 11 months ago

Since a view days the Cucumber for Kotlin plugin reports Kotlin resolution encountered a problem while analyzing KtNameReferenceExpression and the cucumber functionality is blocked.
I guess this is because "Descriptor wasn't found for declaration CLASS" The class mentioned in the error message existists and gets compiled the *.class file si shown decompiled under the build tree in the intellijidea.

What is this error and how can I make the plugin work again?

Thanks for help

Markus

In file: file://C:/VMImages/develop/sdx-at/integrationTest/src/main/resources/com/sdx/dds-client/entities/asset/AssetCreationAndValidationNEW.feature

org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException: Kotlin resolution encountered a problem while analyzing KtNameReferenceExpression at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:267) at org.jetbrains.kotlin.idea.caches.resolve.ExtendedResolutionApiKt.analyze(ExtendedResolutionApi.kt:124) at org.jetbrains.kotlin.idea.caches.resolve.ExtendedResolutionApiKt.safeAnalyzeNonSourceRootCode(ExtendedResolutionApi.kt:158) at org.jetbrains.kotlin.idea.caches.resolve.ExtendedResolutionApiKt.safeAnalyzeNonSourceRootCode(ExtendedResolutionApi.kt:152) at org.jetbrains.kotlin.idea.references.KtFe10ReferenceResolutionHelperImpl.partialAnalyze(KtFe10ReferenceResolutionHelperImpl.kt:48) at org.jetbrains.kotlin.references.fe10.base.KtFe10PolyVariantResolver.resolveToPsiElements(KtFe10PolyVariantResolver.kt:27) at org.jetbrains.kotlin.references.fe10.base.KtFe10PolyVariantResolver.resolve(KtFe10PolyVariantResolver.kt:73) at org.jetbrains.kotlin.references.fe10.base.KtFe10PolyVariantResolver.resolve(KtFe10PolyVariantResolver.kt:22) at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$1(ResolveCache.java:161) at com.intellij.openapi.util.Computable.get(Computable.java:16) at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:237) at com.intellij.openapi.util.Computable.get(Computable.java:16) at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:215) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:160) at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:147) at org.jetbrains.kotlin.idea.references.AbstractKtReference.multiResolve(KtReference.kt:32) at com.intellij.psi.PsiPolyVariantReferenceBase.resolve(PsiPolyVariantReferenceBase.java:47) at org.jetbrains.kotlin.nj2k.postProcessing.UtilsKt.resolve(utils.kt:22) at net.lagerwey.plugins.cucumber.kotlin.CucumberKotlinUtil.isCucumberMethod(CucumberKotlinUtil.kt:64) at net.lagerwey.plugins.cucumber.kotlin.CucumberKotlinUtil.isStepDefinition(CucumberKotlinUtil.kt:38) at net.lagerwey.plugins.cucumber.kotlin.KotlinCucumberExtension.loadStepsFor(KotlinCucumberExtension.kt:94) at org.jetbrains.plugins.cucumber.CucumberUtil.loadFrameworkSteps(CucumberUtil.java:500) at org.jetbrains.plugins.cucumber.steps.CucumberStepHelper.loadStepsFor(CucumberStepHelper.java:130) at org.jetbrains.plugins.cucumber.steps.CucumberStepHelper.findStepDefinitions(CucumberStepHelper.java:77) at org.jetbrains.plugins.cucumber.steps.reference.CucumberStepReference.resolveToDefinitions(CucumberStepReference.java:152) at org.jetbrains.plugins.cucumber.steps.reference.CucumberStepReference.resolveToDefinition(CucumberStepReference.java:142) at org.jetbrains.plugins.cucumber.psi.annotator.GherkinAnnotatorVisitor.visitStep(GherkinAnnotatorVisitor.java:75) at org.jetbrains.plugins.cucumber.psi.impl.GherkinStepImpl.acceptGherkin(GherkinStepImpl.java:99) at org.jetbrains.plugins.cucumber.psi.impl.GherkinPsiElementBase.accept(GherkinPsiElementBase.java:65) at org.jetbrains.plugins.cucumber.psi.annotator.GherkinAnnotator.annotate(GherkinAnnotator.java:16) 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 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) Caused by: org.jetbrains.kotlin.resolve.lazy.NoDescriptorForDeclarationException: Descriptor wasn't found for declaration CLASS

KotlinFullClassNameIndex has 'com.sdx.steps.assets.AssetsSteps' but has no value for it in KotlinSourceFilterScope(delegate=Module-with-dependencies:sdx-at-parent.integrationTest.main compile-only:false include-libraries:false include-other-modules:false include-tests:false, filter=RootKindFilter(includeProjectSourceFiles=true, includeLibraryClassFiles=false, includeLibrarySourceFiles=false, includeScriptDependencies=false, includeScriptsOutsideSourceRoots=true))

at org.jetbrains.kotlin.idea.project.IdeaAbsentDescriptorHandler.diagnoseDescriptorNotFound(IdeaLocalDescriptorResolver.kt:41)
at org.jetbrains.kotlin.resolve.lazy.LazyDeclarationResolver.resolveToDescriptor(LazyDeclarationResolver.kt:91)
at org.jetbrains.kotlin.resolve.lazy.ResolveSession.resolveToDescriptor(ResolveSession.java:368)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.initializerAdditionalResolve(ResolveElementCache.kt:789)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.performElementAdditionalResolve(ResolveElementCache.kt:438)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.getElementsAdditionalResolve(ResolveElementCache.kt:228)
at org.jetbrains.kotlin.idea.project.ResolveElementCache.resolveToElement(ResolveElementCache.kt:286)
at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl$analyze$3.invoke(ModuleResolutionFacadeImpl.kt:53)
at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl$analyze$3.invoke(ModuleResolutionFacadeImpl.kt:52)
at com.intellij.openapi.progress.impl.CancellationCheck.withCancellationCheck(CancellationCheck.kt:59)
at com.intellij.openapi.progress.impl.CancellationCheck$Companion.runWithCancellationCheck(CancellationCheck.kt:105)
at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt.runWithCancellationCheck(ApplicationUtils.kt:63)
at org.jetbrains.kotlin.idea.caches.resolve.ModuleResolutionFacadeImpl.analyze(ModuleResolutionFacadeImpl.kt:52)
at org.jetbrains.kotlin.idea.caches.resolve.ResolutionFacadeWithDebugInfo.analyze(ResolutionFacadeWithDebugInfo.kt:43)
... 60 more