Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frequent plugin errors when working on apple/pkl #74

Open
odenix opened this issue Nov 9, 2024 · 0 comments
Open

Frequent plugin errors when working on apple/pkl #74

odenix opened this issue Nov 9, 2024 · 0 comments

Comments

@odenix
Copy link

odenix commented Nov 9, 2024

When working on Java/Kotlin code of the apple/pkl project, I regularly get exceptions from the Pkl plugin.
Sometimes the exception prevents me from using a Java/Kotlin IDE feature such as "find method usages".

Here is an exception I get frequently:

Error during processing of: 0.26.adoc

java.util.NoSuchElementException: Key base is missing in the map.
	at kotlin.collections.MapsKt__MapWithDefaultKt.getOrImplicitDefaultNullable(MapWithDefault.kt:24)
	at kotlin.collections.MapsKt__MapsKt.getValue(Maps.kt:349)
	at org.pkl.intellij.psi.PklStdLib.<init>(PklStdLib.kt:49)
	at org.pkl.intellij.psi.PklStdLib$Companion.create(PklStdLib.kt:84)
	at org.pkl.intellij.psi.PklStdLibKt._get_pklStdLib_$lambda$0(PklStdLib.kt:38)
	at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.kt:40)
	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.getValue(PsiCachedValueImpl.kt:34)
	at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:126)
	at org.pkl.intellij.psi.PklStdLibKt.getPklStdLib(PklStdLib.kt:36)
	at org.pkl.intellij.psi.PklBaseModuleKt._get_pklBaseModule_$lambda$0(PklBaseModule.kt:28)
	at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.kt:40)
	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.getValue(PsiCachedValueImpl.kt:34)
	at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83)
	at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:126)
	at org.pkl.intellij.psi.PklBaseModuleKt.getPklBaseModule(PklBaseModule.kt:27)
	at org.pkl.intellij.psi.PklQualifiedAccessReference.multiResolve(PklQualifiedAccessReference.kt:60)
	at org.pkl.intellij.psi.PklQualifiedAccessReference.multiResolve(PklQualifiedAccessReference.kt:26)
	at com.intellij.psi.PsiPolyVariantReferenceBase.isReferenceTo(PsiPolyVariantReferenceBase.java:38)
	at com.intellij.psi.search.SingleTargetRequestResultProcessor.processTextOccurrence(SingleTargetRequestResultProcessor.java:36)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$6.lambda$execute$0(PsiSearchHelperImpl.java:1098)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:90)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.lambda$processElementsAtOffsets$0(LowLevelSearchUtil.java:181)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processOffsets(LowLevelSearchUtil.java:210)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:180)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsContainingWordInElement(LowLevelSearchUtil.java:134)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processInjectedFile(LowLevelSearchUtil.java:56)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processTreeUp(LowLevelSearchUtil.java:85)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.lambda$processElementsAtOffsets$0(LowLevelSearchUtil.java:181)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processOffsets(LowLevelSearchUtil.java:210)
	at com.intellij.psi.impl.search.LowLevelSearchUtil.processElementsAtOffsets(LowLevelSearchUtil.java:180)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$6.execute(PsiSearchHelperImpl.java:1094)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.processInReadAction(PsiSearchHelperImpl.java:879)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl$5.processInReadAction(PsiSearchHelperImpl.java:869)
	at com.intellij.openapi.application.ReadActionProcessor.lambda$process$0(ReadActionProcessor.java:11)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:228)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:221)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:857)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:66)
	at com.intellij.openapi.application.ReadActionProcessor.process(ReadActionProcessor.java:11)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processCandidates$19(PsiSearchHelperImpl.java:976)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processVirtualFile$12(PsiSearchHelperImpl.java:651)
	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.psi.impl.search.PsiSearchHelperImpl.processVirtualFile(PsiSearchHelperImpl.java:616)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processPsiFileRoots$8(PsiSearchHelperImpl.java:477)
	at com.intellij.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$10(PsiSearchHelperImpl.java:558)
	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.psi.impl.search.PsiSearchHelperImpl.lambda$processFilesConcurrentlyDespiteWriteActions$11(PsiSearchHelperImpl.java:557)
	at com.intellij.concurrency.ApplierCompleter.processArrayItem(ApplierCompleter.java:116)
	at com.intellij.concurrency.ApplierCompleter.processArray(ApplierCompleter.java:196)
	at com.intellij.concurrency.ApplierCompleter.helpOthers(ApplierCompleter.java:215)
	at com.intellij.concurrency.ApplierCompleter.helpAll(ApplierCompleter.java:176)
	at com.intellij.concurrency.ApplierCompleter.lambda$exec$0(ApplierCompleter.java:106)
	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.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:159)
	at com.intellij.concurrency.ApplierCompleter.wrapAndRun(ApplierCompleter.java:143)
	at com.intellij.concurrency.ApplierCompleter.exec(ApplierCompleter.java:108)
	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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant