Skip to content
This repository has been archived by the owner on Mar 12, 2022. It is now read-only.

"TypeProvider contract violation" #257

Open
HenkPoley opened this issue May 11, 2020 · 0 comments
Open

"TypeProvider contract violation" #257

HenkPoley opened this issue May 11, 2020 · 0 comments

Comments

@HenkPoley
Copy link

HenkPoley commented May 11, 2020

PhpStorm 2020.1.1 mutters about Laravel plugin 0.15.4:

com.intellij.diagnostic.PluginException: TypeProvider contract violation? by class de.espend.idea.laravel.blade.BladeInjectTypeProvider on $uri [Plugin: de.espend.idea.laravel]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:446)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:58)
	at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.lambda$getTypeFromAST$1(PhpTypeInfo.java:128)
	at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:117)
	at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getTypeFromAST(PhpTypeInfo.java:91)
	at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:75)
	at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:34)
	at com.jetbrains.php.lang.psi.elements.impl.PhpTypedElementImpl.getType(PhpTypedElementImpl.java:24)
	at com.jetbrains.php.lang.psi.elements.impl.VariableImpl.getType(VariableImpl.java:625)
	at com.jetbrains.php.lang.inspections.PhpUndefinedVariableInspection$2.processAccessVariableInstruction(PhpUndefinedVariableInspection.java:179)
	at com.jetbrains.php.codeInsight.controlFlow.instructions.impl.PhpAccessVariableInstructionImpl.process(PhpAccessVariableInstructionImpl.java:33)
	at com.jetbrains.php.codeInsight.controlFlow.PhpControlFlowUtil.processPredecessors(PhpControlFlowUtil.java:143)
	at com.jetbrains.php.codeInsight.controlFlow.PhpControlFlowUtil.processPredecessors(PhpControlFlowUtil.java:106)
	at com.jetbrains.php.lang.inspections.PhpUndefinedVariableInspection.analyzeScope(PhpUndefinedVariableInspection.java:154)
	at com.jetbrains.php.lang.inspections.PhpUndefinedVariableInspection.access$200(PhpUndefinedVariableInspection.java:64)
	at com.jetbrains.php.lang.inspections.PhpUndefinedVariableInspection$1.visitPhpFile(PhpUndefinedVariableInspection.java:135)
	at com.jetbrains.php.lang.psi.PhpFileImpl.accept(PhpFileImpl.java:194)
	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:69)
	at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:60)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:297)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$3(LocalInspectionsPass.java:266)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:155)
	at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:147)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$null$4(LocalInspectionsPass.java:265)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
	at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
	at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:265)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:625)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:570)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:117)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:168)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:168)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Caused by: com.intellij.psi.PsiInvalidElementAccessException: Element class com.intellij.psi.impl.source.tree.CompositeElement of type Variable (class com.jetbrains.php.lang.psi.stubs.PhpVariableElementType)
	at com.intellij.psi.PsiInvalidElementAccessException.createByNode(PsiInvalidElementAccessException.java:79)
	at com.intellij.psi.impl.source.SubstrateRef$2.getContainingFile(SubstrateRef.java:101)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getContainingFile(StubBasedPsiElementBase.java:253)
	at de.espend.idea.laravel.blade.BladeInjectTypeProvider.getHostBladeFileForInjectionIfExists(BladeInjectTypeProvider.java:83)
	at de.espend.idea.laravel.blade.BladeInjectTypeProvider.getType(BladeInjectTypeProvider.java:47)
	at com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.lambda$getTypeFromAST$1(PhpTypeInfo.java:117)
	... 43 more
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant