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

Unhandled exception: java.lang.NoSuchMethodError: 'org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiElementFactory$.createTypeElementFromText(java.lang.String, com.intellij.psi.PsiElement, com.intellij.psi.PsiElement)' #445

Open
hmemcpy opened this issue May 22, 2023 · 1 comment
Labels
plugin-exception An exception in the plugin

Comments

@hmemcpy
Copy link
Collaborator

hmemcpy commented May 22, 2023

The following exceptions(s) occurred in the ZIO for IntelliJ plugin:

java.lang.NoSuchMethodError: 'org.jetbrains.plugins.scala.lang.psi.api.base.types.ScTypeElement org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiElementFactory$.createTypeElementFromText(java.lang.String, com.intellij.psi.PsiElement, com.intellij.psi.PsiElement)'
	at zio.intellij.utils.package$.$anonfun$createTypeElement$1(package.scala:122)
	at org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiElementFactory$.safe(ScalaPsiElementFactory.scala:255)
	at zio.intellij.utils.package$.createTypeElement(package.scala:122)
	at zio.intellij.utils.package$.createTypeElement(package.scala:127)
	at zio.intellij.inspections.suggestions.SuggestTypeAliasInspection.$anonfun$buildVisitor$7(SuggestTypeAliasInspection.scala:34)
	at scala.collection.immutable.List.flatMap(List.scala:293)
	at zio.intellij.inspections.suggestions.SuggestTypeAliasInspection.$anonfun$buildVisitor$6(SuggestTypeAliasInspection.scala:34)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at scala.Option$.when(Option.scala:41)
	at zio.intellij.inspections.suggestions.SuggestTypeAliasInspection.zio$intellij$inspections$suggestions$SuggestTypeAliasInspection$$$anonfun$buildVisitor$1(SuggestTypeAliasInspection.scala:31)
	at zio.intellij.inspections.suggestions.SuggestTypeAliasInspection$$anonfun$buildVisitor$9.visitPsiElement(SuggestTypeAliasInspection.scala:21)
	at org.jetbrains.plugins.scala.codeInspection.package$PsiElementVisitorSimple.visitElement(package.scala:102)
	at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274)
	at org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiElementImpl.org$jetbrains$plugins$scala$lang$psi$api$ScalaPsiElement$$super$accept(ScalaPsiElementImpl.scala:21)
	at org.jetbrains.plugins.scala.lang.psi.api.ScalaPsiElement.accept(ScalaPsiElement.scala:108)
	at org.jetbrains.plugins.scala.lang.psi.api.ScalaPsiElement.accept$(ScalaPsiElement.scala:106)
	at org.jetbrains.plugins.scala.lang.psi.impl.ScalaPsiElementImpl.accept(ScalaPsiElementImpl.scala:21)
	at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:82)
	at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:57)
	at com.intellij.codeInspection.InspectionEngine.lambda$inspectElements$8(InspectionEngine.java:283)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
	at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1149)
	at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:608)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
	at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:196)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:211)
	at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
	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)

Additional information:

ZIO plugin version: 2023.2.26.1034
Scala plugin version: 2023.2.417
ZIO version(s): 1.0.17, 1.0.12
Scala version(s): 2.13.6, 2.13.6
sbt version: 1.6.2
IntelliJ version: IntelliJ IDEA 2023.2 EAP
Build #IU-232.6095.10
Java version: 17.0.7+7-b953.1
Operating System: aarch64 Mac OS X (13.3.1, aarch64)
JVM version: OpenJDK 64-Bit Server VM JetBrains s.r.o.

@hmemcpy hmemcpy added the plugin-exception An exception in the plugin label May 22, 2023
@hmemcpy
Copy link
Collaborator Author

hmemcpy commented May 22, 2023

Trying to invoke the "More specific type alias" on a definition:

object Foo {
  val x{caret}: ZIO[Any, Throwable, Unit] = ???
}

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

No branches or pull requests

1 participant