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

IDE error occured #436

Closed
Qziem opened this issue Nov 20, 2023 · 6 comments
Closed

IDE error occured #436

Qziem opened this issue Nov 20, 2023 · 6 comments

Comments

@Qziem
Copy link

Qziem commented Nov 20, 2023

plugin version: 0.118-2023.2

It occure only with 0.118 version, when using 0.117.1 everythings are fine.
After starging IDE (phpstom) i have warning: IDE error occured. After click to see details there is this:
Screenshot from 2023-11-20 09-42-42

This error warning shows many time during using IDE but with different exceptions.
Becouse of that error, ctrl+click on function doesn't work (even for non rescript files).
In my project i'm using rescript package with version: ^9.1.4.

My IDE details:

Build #PS-232.10072.32, built on October 13, 2023
Licensed to Leon Software sp. z o.o. sp. j. / Kamil Kuzma
Subscription is active until November 27, 2023.
Runtime version: 17.0.8.1+7-b1000.32 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 6.2.0-36-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 20
Registry:
    run.processes.with.pty=TRUE

Non-Bundled Plugins:
    de.netnexus.camelcaseplugin (3.0.12)
    com.github.copilot (1.4.1.3828)
    com.kalessil.phpStorm.phpInspectionsEA (5.0.0.0)
    de.espend.idea.php.annotation (9.4.0)
    reasonml (0.117.1-2023.2)
    com.intellij.lang.jsgraphql (4.0.2)

Current Desktop: ubuntu:GNOME

Occured errors details (only two, there is more types of errors, i can past it if someone need it):

Error while indexing /home/leon/public_html/client/react/src/components/Sched/SchedTimezoneToggle/SchedTimezoneToggle.res
To reindex this file IDEA has to be restarted
   
   java.lang.NoClassDefFoundError: com/intellij/core/JavaPsiBundle
	at com.reason.lang.CommonPsiParser.parse(CommonPsiParser.java:32)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:58)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$2(LazyParseableElement.java:183)
	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:503)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:182)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:234)
	at com.intellij.psi.impl.source.tree.CompositeElement.countChildren(CompositeElement.java:406)
	at com.intellij.psi.impl.source.tree.CompositeElement.getChildrenAsPsiElements(CompositeElement.java:369)
	at com.intellij.psi.impl.source.PsiFileImpl.getChildren(PsiFileImpl.java:732)
	at com.intellij.psi.util.PsiTreeUtil.processElements(PsiTreeUtil.java:929)
	at com.intellij.psi.util.PsiTreeUtil.findChildrenOfAnyType(PsiTreeUtil.java:316)
	at com.intellij.psi.util.PsiTreeUtil.findChildrenOfType(PsiTreeUtil.java:279)
	at com.reason.ide.search.index.FileModuleIndex.lambda$getIndexer$0(FileModuleIndex.java:87)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapByIndexer(MapReduceIndex.java:313)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInput(MapReduceIndex.java:304)
	at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:162)
	at com.intellij.util.indexing.impl.storage.VfsAwareMapReduceIndex.mapInput(VfsAwareMapReduceIndex.java:39)
	at com.intellij.util.indexing.impl.MapReduceIndex.mapInputAndPrepareUpdate(MapReduceIndex.java:249)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.updateBaseIndex(CompositeInvertedIndexBase.java:294)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:64)
	at com.intellij.indexing.composite.CompositeInvertedIndexBase.mapInputAndPrepareUpdate(CompositeInvertedIndexBase.java:30)
	at com.intellij.util.indexing.FileBasedIndexImpl.createSingleIndexValueApplier(FileBasedIndexImpl.java:1614)
	at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$25(FileBasedIndexImpl.java:1483)
	at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyWithProvidedValueIn(FileTypeManagerImpl.java:676)
	at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1435)
	at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1408)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexOneFileOfJob$4(IndexUpdateRunner.java:322)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:832)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:864)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:602)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:565)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:565)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.executeSynchronously(NonBlockingReadActionImpl.java:492)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.executeSynchronously(NonBlockingReadActionImpl.java:222)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexOneFileOfJob(IndexUpdateRunner.java:326)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$indexJobsFairly$3(IndexUpdateRunner.java:248)
	at com.intellij.openapi.progress.impl.ProgressSuspender.executeNonSuspendableSection(ProgressSuspender.java:89)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.indexJobsFairly(IndexUpdateRunner.java:251)
	at com.intellij.util.indexing.contentQueue.IndexUpdateRunner.lambda$doIndexFiles$2(IndexUpdateRunner.java:182)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:24)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: com.intellij.core.JavaPsiBundle PluginClassLoader(plugin=PluginDescriptor(name=ReasonML, id=reasonml, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/PhpStorm2023.2/reasonml-idea-plugin, version=0.118-2023.2, package=null, isBundled=false), packagePrefix=null, state=active)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.kt:156)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 69 more
java.lang.NoClassDefFoundError: com/intellij/core/JavaPsiBundle
	at com.reason.lang.CommonPsiParser.parse(CommonPsiParser.java:32)
	at com.intellij.psi.tree.ILazyParseableElementType.doParseContents(ILazyParseableElementType.java:58)
	at com.intellij.psi.tree.IFileElementType.parseContents(IFileElementType.java:53)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$2(LazyParseableElement.java:183)
	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:503)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:182)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:234)
	at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:25)
	at com.intellij.psi.impl.BlockSupportImpl.isReplaceWholeNode(BlockSupportImpl.java:409)
	at com.intellij.psi.impl.BlockSupportImpl.mergeTrees(BlockSupportImpl.java:356)
	at com.intellij.psi.impl.BlockSupportImpl.makeFullParse(BlockSupportImpl.java:291)
	at com.intellij.psi.impl.BlockSupportImpl.reparse(BlockSupportImpl.java:90)
	at com.intellij.psi.impl.DocumentCommitThread.doCommit(DocumentCommitThread.java:265)
	at com.intellij.psi.impl.DocumentCommitThread.commitUnderProgress(DocumentCommitThread.java:130)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$commitAsynchronously$0(DocumentCommitThread.java:81)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:832)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:864)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:602)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:565)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:565)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:466)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:481)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:249)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:31)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:227)
	at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:215)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassNotFoundException: com.intellij.core.JavaPsiBundle PluginClassLoader(plugin=PluginDescriptor(name=ReasonML, id=reasonml, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/PhpStorm2023.2/reasonml-idea-plugin, version=0.118-2023.2, package=null, isBundled=false), packagePrefix=null, state=active)
	... 50 more
@giraud
Copy link
Owner

giraud commented Nov 20, 2023

Common parser is trying to display an error message from an internationalisation file from java.
The code is incorrect, I should (and I don’t need) not have a dependency to java for that. I will change it quickly.

But that code is present since version 0.109 !!

Can you share a file where that error happen ? Parsers have been updated and something happen now that should not.

@giraud
Copy link
Owner

giraud commented Nov 21, 2023

Removed the class in 0.118.1.

@Qziem
Copy link
Author

Qziem commented Nov 21, 2023

Thanks, seems that it helps.
Probably i have mistaken about that problem wasn't befor. It was, but before it doesen't block ctrl+clik on funtion, so i probably ignored it.
In file in my project when problem occured, IDE shows many warning but code is fine becouse rescript compile (run in linux terminal, independent of IDE) it without any errors. I think its becouse i use graphl ppx
File content:

module GetOperatorBasesQuery = %graphql(`
  query SchedGetOperatorBases {
    operatorBases {
      baseNid
      name
      utcOffset
    }
  }
`)

type toggleOption =
  | Utc
  | BaseTime

let items = list{Utc, BaseTime}

let formatUtcOffset = utcOffset => {
  let offsetSign = utcOffset > -1 ? "+" : ""
  let utcOffsetHours = utcOffset / 3600
  let utcOffsetMinutes =
    (mod(utcOffset, 3600) / 60)->Js.Math.abs_int->Js.Int.toString->Leon.Helpers.padStart(2, "0")

  j`$(offsetSign)$(utcOffsetHours):$(utcOffsetMinutes)`
}

@react.component
let make = (~onChange, ~useBaseTimezone, ~baseNid, ~disabled=?) => {
  let (result, _) = ApolloHooks.useQuery(GetOperatorBasesQuery.definition)
  let maybeBase = switch result {
  | Data(response) =>
    Belt.Array.getBy(response["operatorBases"], base => base["baseNid"] == baseNid->Json.Encode.int)
  | _ => None
  }

  let handleChange = nextActive => onChange(nextActive === Utc ? None : Some(baseNid))

  switch maybeBase {
  | Some(base) =>
    let renderOption = x =>
      switch x {
      | Utc => "UTC"
      | BaseTime =>
        let offset = formatUtcOffset(base["utcOffset"])
        j`BT ($offset)`
      }

    <ToggleButtonRe
      items
      onChange=handleChange
      active={useBaseTimezone == None ? Utc : BaseTime}
      labelProvider=renderOption
      ?disabled
    />
  | None => React.null
  }
}

let default = make

Screen how this file looks in IDE:
Screenshot from 2023-11-21 09-14-05

Another thing is that IDE show error in this situation
Screenshot from 2023-11-21 09-07-58
But code compile without any errors.
Interesting thing is that: if i add spaces, problem disapear
Screenshot from 2023-11-21 09-09-50

@giraud
Copy link
Owner

giraud commented Nov 21, 2023

thank you for the explanations, I will look into it.

@giraud
Copy link
Owner

giraud commented Nov 21, 2023

issue is fixed in 0.118.2.

you’ll still get errors inside the body of the graphql extension, it is another problem with language injection and I have created a new bug to fix it.

@Qziem
Copy link
Author

Qziem commented Nov 21, 2023

Okey, thanks !

@Qziem Qziem closed this as completed Nov 21, 2023
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

2 participants