inxilpro / IntellijAlpine

Alpine.js plugin for IntelliJ IDEs like PhpStorm and WebStorm.
MIT License
49 stars 11 forks source link

JavaScript and TypeScript plugin crashes every time I open Pycharm #65

Open GeorgeFlorian opened 8 months ago

GeorgeFlorian commented 8 months ago

Using AlpineJS plugin prompts the following errors and crashes and disabling it fixes the issues:

java.lang.ClassCastException: Not a stub type: HTML_TAG in class com.intellij.lang.javascript.flex.XmlBackedJSClassImpl
    at com.intellij.extapi.psi.StubBasedPsiElementBase.getElementType(StubBasedPsiElementBase.java:319)
    at com.intellij.lang.javascript.psi.resolve.ES6QualifiedNameResolver.getElementType(ES6QualifiedNameResolver.java:107)
    at com.intellij.lang.javascript.psi.resolve.ES6QualifiedNameResolver.getTopLevelElementsWalkUp(ES6QualifiedNameResolver.java:68)
    at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.getTopLevelElements(JSQualifiedNameResolver.java:171)
    at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.getExpandedTopLevelElements(JSQualifiedNameResolver.java:179)
    at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.resolveByComponents(JSQualifiedNameResolver.java:124)
    at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.resolveQualifiedName(JSQualifiedNameResolver.java:67)
    at com.intellij.lang.javascript.psi.resolve.JSImportHandler.resolveName(JSImportHandler.java:61)
    at com.intellij.lang.javascript.psi.resolve.JSImportHandler.resolveName(JSImportHandler.java:55)
    at com.intellij.lang.javascript.psi.resolve.JSImportHandler.resolveMainElementName(JSImportHandler.java:47)
    at com.intellij.lang.javascript.psi.types.JSTypeImpl.resolveTypeImpl(JSTypeImpl.java:190)
    at com.intellij.lang.javascript.psi.types.JSTypeImpl.lambda$createResolvedTypeInfoCachedValue$2(JSTypeImpl.java:156)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:37)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:240)
    at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:240)
    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:241)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:27)
    at com.intellij.lang.javascript.psi.types.JSTypeImpl.resolveType(JSTypeImpl.java:174)
    at com.intellij.lang.javascript.psi.types.JSTypeImpl.getJSTypedef(JSTypeImpl.java:440)
    at com.intellij.lang.javascript.psi.types.JSTypeImpl.getDeclarations(JSTypeImpl.java:656)
    at com.intellij.lang.javascript.psi.resolve.JSImportHandlingUtil.resolveElementsByType(JSImportHandlingUtil.java:113)
    at com.intellij.lang.javascript.ecmascript6.TypeScriptQualifiedItemProcessor.resolveElementsByTypeWithContext(TypeScriptQualifiedItemProcessor.java:227)
    at com.intellij.lang.javascript.psi.resolve.JavaScriptQualifiedItemProcessor.resolveElementsByTypeWithContext(JavaScriptQualifiedItemProcessor.java:50)
    at com.intellij.lang.javascript.ecmascript6.TypeScriptQualifiedItemProcessor.getElements(TypeScriptQualifiedItemProcessor.java:218)
    at com.intellij.lang.javascript.ecmascript6.TypeScriptQualifiedItemProcessor.processImpl(TypeScriptQualifiedItemProcessor.java:93)
    at com.intellij.lang.javascript.psi.resolve.QualifiedItemProcessor.process(QualifiedItemProcessor.java:145)
    at com.intellij.lang.javascript.psi.resolve.JSCompleteTypeEvaluationProcessor.passToBaseProcessor(JSCompleteTypeEvaluationProcessor.java:114)
    at com.intellij.lang.javascript.psi.resolve.JSCompleteTypeEvaluationProcessor.doAddType(JSCompleteTypeEvaluationProcessor.java:58)
    at com.intellij.lang.javascript.psi.resolve.JSCompleteTypeEvaluationProcessor.process(JSCompleteTypeEvaluationProcessor.java:43)
    at com.intellij.lang.javascript.psi.resolve.JSCompleteTypeEvaluationProcessor.evaluateTypes(JSCompleteTypeEvaluationProcessor.java:138)
    at com.intellij.lang.javascript.psi.resolve.JSCompleteTypeEvaluationProcessor.evaluateTypes(JSCompleteTypeEvaluationProcessor.java:129)
    at com.intellij.lang.javascript.psi.resolve.QualifiedItemProcessor.evaluateExpressionOrElementType(QualifiedItemProcessor.java:662)
    at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:125)
    at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:47)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$5.get(JSResolveUtil.java:1673)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$5.get(JSResolveUtil.java:1670)
    at com.intellij.lang.javascript.psi.resolve.JSEvaluatorComplexityTracker.runTask(JSEvaluatorComplexityTracker.java:67)
    at com.intellij.lang.javascript.psi.resolve.JSComplexityAwareRecursionGuard.lambda$getCachedValue$0(JSComplexityAwareRecursionGuard.java:68)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$4.lambda$calculateWithCaching$0(JSResolveUtil.java:1686)
    at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolveWithCaching$5(ResolveCache.java:268)
    at com.intellij.openapi.util.Computable.get(Computable.java:16)
    at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:234)
    at com.intellij.openapi.util.Computable.get(Computable.java:16)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:213)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:268)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$4.calculateWithCaching(JSResolveUtil.java:1684)
    at com.intellij.lang.javascript.psi.resolve.JSComplexityAwareRecursionGuard.getCachedValue(JSComplexityAwareRecursionGuard.java:71)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:1668)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.doMultiResolve(JSReferenceExpressionImpl.java:526)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.multiResolve(JSReferenceExpressionImpl.java:518)
    at com.intellij.lang.javascript.highlighting.JSSemanticHighlightingVisitor.highlight(JSSemanticHighlightingVisitor.java:119)
    at com.intellij.lang.javascript.highlighting.JSSemanticHighlightingVisitor.visitJSReferenceExpression(JSSemanticHighlightingVisitor.java:657)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.accept(JSReferenceExpressionImpl.java:506)
    at com.intellij.lang.javascript.validation.JSAnnotator.annotate(JSAnnotator.java:17)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:128)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:106)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$runHighlightVisitorsForInjected$8(InjectedGeneralHighlightingPass.java:296)
    at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:91)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.runHighlightVisitorsForInjected(InjectedGeneralHighlightingPass.java:293)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.addInjectedPsiHighlights(InjectedGeneralHighlightingPass.java:233)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$collectInformationWithProgress$3(InjectedGeneralHighlightingPass.java:81)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$processInjectedPsiFiles$5(InjectedGeneralHighlightingPass.java:175)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUpInner(InjectedLanguageUtilBase.java:248)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.lambda$probeElementsUp$0(InjectedLanguageUtilBase.java:214)
    at com.intellij.openapi.application.impl.ReadActionCacheImpl$allowInWriteAction$1.invoke(ReadActionCacheImpl.kt:41)
    at com.intellij.openapi.application.impl.ReadActionCacheImpl$allowInWriteAction$1.invoke(ReadActionCacheImpl.kt:41)
    at com.intellij.openapi.application.impl.ReadActionCacheImpl.allowInWriteAction(ReadActionCacheImpl.kt:29)
    at com.intellij.openapi.application.impl.ReadActionCacheImpl.allowInWriteAction(ReadActionCacheImpl.kt:41)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.probeElementsUp(InjectedLanguageUtilBase.java:213)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtilBase.enumerate(InjectedLanguageUtilBase.java:156)
    at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:379)
    at com.intellij.codeInsight.daemon.impl.InjectedGeneralHighlightingPass.lambda$processInjectedPsiFiles$6(InjectedGeneralHighlightingPass.java:173)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:139)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:152)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1075)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:96)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:108)
    at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:86)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:200)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:184)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:86)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
    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)
GeorgeFlorian commented 8 months ago

Opened a ticket on jetbrains and they pointed to this plugin. Disabling it solves the crahses.