spxbhuhb / adaptive

Consolidated full-stack application development library for Kotlin
https://adaptive.fun
Apache License 2.0
3 stars 0 forks source link

FIR compilation bug #51

Closed toth-istvan-zoltan closed 2 months ago

toth-istvan-zoltan commented 2 months ago
java.lang.NoClassDefFoundError: fun/adaptive/kotlin/service/ServicesPluginKey
    at fun.adaptive.kotlin.service.fir.ServicesDeclarationGenerator.isForeign(ServicesDeclarationGenerator.kt:176)
    at fun.adaptive.kotlin.service.fir.ServicesDeclarationGenerator.getCallableNamesForClass(ServicesDeclarationGenerator.kt:80)
    at org.jetbrains.kotlin.fir.scopes.impl.FirGeneratedMemberDeclarationsStorage.getCallableStorage$providers(FirGeneratedScopes.kt:145)
    at org.jetbrains.kotlin.fir.scopes.impl.FirGeneratedClassDeclaredMemberScope$Companion.create(FirGeneratedScopes.kt:46)
    at org.jetbrains.kotlin.fir.scopes.impl.FirDeclaredMemberScopeProvider.createDeclaredMemberScope(FirDeclaredMemberScopeProvider.kt:93)
    at org.jetbrains.kotlin.fir.scopes.impl.FirDeclaredMemberScopeProvider.declaredMemberCache$lambda$0(FirDeclaredMemberScopeProvider.kt:30)
    at org.jetbrains.kotlin.analysis.low.level.api.fir.fir.caches.FirThreadSafeCache.getValue(FirThreadSafeCache.kt:27)
    at org.jetbrains.kotlin.fir.scopes.impl.FirDeclaredMemberScopeProvider.declaredMemberScope(FirDeclaredMemberScopeProvider.kt:52)
    at org.jetbrains.kotlin.fir.scopes.impl.FirDeclaredMemberScopeProviderKt.declaredMemberScope(FirDeclaredMemberScopeProvider.kt:136)
    at org.jetbrains.kotlin.analysis.api.fir.components.KaFirScopeProvider.getCombinedFirKotlinDeclaredMemberScope(KaFirScopeProvider.kt:152)
    at org.jetbrains.kotlin.analysis.api.fir.components.KaFirScopeProvider.getFirKotlinDeclaredMemberScope(KaFirScopeProvider.kt:136)
    at org.jetbrains.kotlin.analysis.api.fir.components.KaFirScopeProvider.getDeclaredMemberScope(KaFirScopeProvider.kt:126)
    at org.jetbrains.kotlin.analysis.api.fir.components.KaFirScopeProvider.getCombinedDeclaredMemberScope(KaFirScopeProvider.kt:105)
    at org.jetbrains.kotlin.analysis.api.impl.base.KaBaseSession.getCombinedDeclaredMemberScope(KaBaseSession.kt)
    at org.jetbrains.kotlin.light.classes.symbol.classes.SymbolLightClassForClassOrObject$getOwnMethods$$inlined$cachedValue$1.compute(symbolLightUtils.kt:362)
    at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:173)
    at com.intellij.psi.impl.PsiCachedValueImpl$Direct.doCompute(PsiCachedValueImpl.kt:77)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:236)
    at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:236)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
    at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:237)
    at com.intellij.psi.impl.PsiCachedValueImpl$Direct.getValue(PsiCachedValueImpl.kt:81)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:170)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
    at org.jetbrains.kotlin.light.classes.symbol.classes.SymbolLightClassForClassOrObject.getOwnMethods(SymbolLightClassForClassOrObject.kt:314)
    at org.jetbrains.kotlin.asJava.classes.ClassInnerStuffCache.calcMethods(ClassInnerStuffCache.java:221)
    at org.jetbrains.kotlin.asJava.classes.ClassInnerStuffCache.lambda$getMethods$2(ClassInnerStuffCache.java:94)
    at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:173)
    at com.intellij.psi.impl.PsiCachedValueImpl$Direct.doCompute(PsiCachedValueImpl.kt:77)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:236)
    at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:236)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
    at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:237)
    at com.intellij.psi.impl.PsiCachedValueImpl$Direct.getValue(PsiCachedValueImpl.kt:81)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:170)
    at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
    at org.jetbrains.kotlin.asJava.classes.ClassInnerStuffCache.getMethods(ClassInnerStuffCache.java:91)
    at org.jetbrains.kotlin.light.classes.symbol.classes.SymbolLightClassBase.getMethods(SymbolLightClassBase.kt:51)
    at org.jetbrains.kotlin.asJava.LightClassUtil.getPsiMethodWrappers$lambda$6(LightClassUtil.kt:169)
    at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:315)
    at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:303)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:169)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at org.jetbrains.kotlin.asJava.LightClassUtil.extractPropertyAccessors(LightClassUtil.kt:339)
    at org.jetbrains.kotlin.asJava.LightClassUtil.getLightClassPropertyMethods(LightClassUtil.kt:138)
    at org.jetbrains.uast.kotlin.BaseKotlinConverter.convertParameter(BaseKotlinConverter.kt:420)
    at org.jetbrains.uast.kotlin.BaseKotlinConverter.convertDeclaration(BaseKotlinConverter.kt:233)
    at org.jetbrains.uast.kotlin.BaseKotlinConverter.convertDeclarationOrElement(BaseKotlinConverter.kt:294)
    at org.jetbrains.uast.kotlin.FirKotlinUastLanguagePlugin.convertElementWithParent(FirKotlinUastLanguagePlugin.kt:66)
    at org.jetbrains.uast.UastFacade.convertElementWithParent(UastContext.kt:66)
    at org.jetbrains.uast.UastContextKt.toUElement(UastContext.kt:153)
    at com.intellij.codeInspection.i18n.folding.PropertyFoldingBuilder$2.visitElement(PropertyFoldingBuilder.java:64)
    at org.jetbrains.kotlin.psi.KtElementImplStub.accept(KtElementImplStub.java:52)
    at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:58)
    at com.intellij.psi.PsiWalkingState.visit(PsiWalkingState.java:11)
    at com.intellij.util.WalkingState.walkChildren(WalkingState.java:63)
    at com.intellij.util.WalkingState.elementStarted(WalkingState.java:40)
    at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:67)
    at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitElement(PsiRecursiveElementWalkingVisitor.java:34)
    at com.intellij.codeInspection.i18n.folding.PropertyFoldingBuilder$2.visitElement(PropertyFoldingBuilder.java:68)
    at com.intellij.psi.PsiElementVisitor.visitFile(PsiElementVisitor.java:51)
    at com.intellij.psi.PsiRecursiveElementWalkingVisitor.visitFile(PsiRecursiveElementWalkingVisitor.java:56)
    at org.jetbrains.kotlin.psi.KtCommonFile.accept(KtCommonFile.kt:246)
    at com.intellij.codeInspection.i18n.folding.PropertyFoldingBuilder.buildFoldRegions(PropertyFoldingBuilder.java:50)
    at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptorsNoPlaceholderCaching(LanguageFolding.java:90)
    at com.intellij.lang.folding.CompositeFoldingBuilder.buildFoldRegions(CompositeFoldingBuilder.java:40)
    at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptorsNoPlaceholderCaching(LanguageFolding.java:90)
    at com.intellij.lang.folding.LanguageFolding.buildFoldingDescriptors(LanguageFolding.java:72)
    at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:272)
    at com.intellij.codeInsight.folding.impl.FoldingUpdate.getFoldingsFor(FoldingUpdate.java:240)
    at com.intellij.codeInsight.folding.impl.FoldingUpdate.getUpdateResult(FoldingUpdate.java:89)
    at com.intellij.codeInsight.folding.impl.FoldingUpdate.updateFoldRegions(FoldingUpdate.java:73)
    at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegions(CodeFoldingManagerImpl.java:293)
    at com.intellij.codeInsight.folding.impl.CodeFoldingManagerImpl.updateFoldRegionsAsync(CodeFoldingManagerImpl.java:280)
    at com.intellij.codeInsight.folding.impl.CodeFoldingPass.doCollectInformation(CodeFoldingPass.java:31)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:57)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:418)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.runWithSpanIgnoreThrows(trace.kt:118)
    at com.intellij.platform.diagnostic.telemetry.helpers.TraceUtil.runWithSpanThrows(TraceUtil.java:36)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$3(PassExecutorService.java:413)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$4(PassExecutorService.java:404)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:403)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:379)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.cacheFileTypesInside(FileTypeManagerImpl.java:802)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$1(PassExecutorService.java:379)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.executeByImpatientReader(AnyThreadWriteThreadingSupport.kt:486)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:377)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:190)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.ClassNotFoundException: fun.adaptive.kotlin.service.ServicesPluginKey
    ... 113 more
toth-istvan-zoltan commented 2 months ago

I think this was a strange caching issue, clear solved it. I'll close this for now.