jasmine / IdeaJasmine

12 stars 5 forks source link

Resolve RubyMine 2023.3 incompatibility #23

Closed tingraldi closed 9 months ago

tingraldi commented 9 months ago

The main change here is the removal of the isTestRunnerPackageAvailableFor test in JasmineRunConfigurationProducer. Removal of this test restores the ability to execute Jasmine tests by clicking the gutter icons for suites and individual specs.

Other changes include some spelling corrections and minor source enhancements. A utility function was added to allow for convenient posting of notifications. This mechanism was used to aid in troubleshooting, but all invocations have been removed from the source.

The version number was bumped to 1.8.1.

sgravrock commented 9 months ago

Mind sharing details of your environment and Jasmine run configuration? I'm having trouble getting this to work. I still don't see gutter icons, just like with the published 1.8 plugin. My ability to debug is pretty limited because I don't have IntelliJ Ultimate, but I got the following by using the notification mechanism you added to do some logging:

checkConfiguration throwing from validateForRunConfiguration: com.intellij.openapi.progress.ProcessCanceledException com.intellij.openapi.progress.ProcessCanceledException
at com.intellij.openapi.progress.EmptyProgressIndicatorBase.checkCanceled(EmptyProgressIndicatorBase.java:55)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.checkCancelledEvenWithPCEDisabled(ProgressIndicatorUtils.java:403)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:333)
at com.intellij.openapi.progress.util.ProgressIndicatorUtils.awaitWithCheckCanceled(ProgressIndicatorUtils.java:327)
at com.intellij.openapi.vfs.DiskQueryRelay.accessDiskWithCheckCanceled(DiskQueryRelay.java:59)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.getAttributes(LocalFileSystemBase.java:736)
at com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl.getAttributes(LocalFileSystemImpl.java:300)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.getChildData(PersistentFSImpl.java:2129)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.lambda$findChildInfo$5(PersistentFSImpl.java:571)
at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.update(FSRecordsImpl.java:721)
at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findChildInfo(PersistentFSImpl.java:603)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findInPersistence(VirtualDirectoryImpl.java:154)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChild(VirtualDirectoryImpl.java:137)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:83)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:535)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:51)
at com.intellij.openapi.vfs.VirtualFile.findFileByRelativePath(VirtualFile.java:384)
at com.intellij.javascript.nodejs.NodeModuleSearchUtil.findModuleWithNameInDirectory(NodeModuleSearchUtil.java:119)
at com.intellij.javascript.nodejs.NodeModuleSearchUtil.lambda$findGloballyInstalledModules$1(NodeModuleSearchUtil.java:93)
at com.intellij.openapi.application.ReadAction.lambda$run$1(ReadAction.java:53)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:65)
at com.intellij.openapi.application.ReadAction.run(ReadAction.java:52)
at com.intellij.javascript.nodejs.NodeModuleSearchUtil.findGloballyInstalledModules(NodeModuleSearchUtil.java:92)
at com.intellij.javascript.nodejs.util.NodePackageDescriptor.findGloballyInstalledPackages(NodePackageDescriptor.java:319)
at com.intellij.javascript.nodejs.util.NodePackageDescriptor.listAvailable(NodePackageDescriptor.java:305)
at com.intellij.javascript.nodejs.util.NodePackageDescriptor.lambda$listAvailable$2(NodePackageDescriptor.java:155)
at com.intellij.openapi.application.ReadAction.lambda$run$1(ReadAction.java:53)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:65)
at com.intellij.openapi.application.ReadAction.run(ReadAction.java:52)
at com.intellij.javascript.nodejs.util.NodePackageDescriptor.listAvailable(NodePackageDescriptor.java:155)
at com.intellij.javascript.nodejs.util.NodePackageDescriptor.listAvailable(NodePackageDescriptor.java:143)
at com.intellij.javascript.nodejs.util.NodePackageDescriptor.lambda$findFirstDirectDependencyPackage$0(NodePackageDescriptor.java:112)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:909)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:65)
at com.intellij.javascript.nodejs.util.NodePackageDescriptor.findFirstDirectDependencyPackage(NodePackageDescriptor.java:111)
at com.intellij.javascript.nodejs.util.NodePackage.findPreferredPackage(NodePackage.java:239)
at io.pivotal.intellij.jasmine.JasmineRunConfiguration.selectedJasminePackage(JasmineRunConfiguration.kt:37)
at io.pivotal.intellij.jasmine.JasmineRunConfiguration.checkConfiguration(JasmineRunConfiguration.kt:70)
at com.intellij.execution.impl.RunnerAndConfigurationSettingsImpl.checkSettings$lambda$7(RunnerAndConfigurationSettingsImpl.kt:348)
[...]
tingraldi commented 9 months ago

The project I'm working in is using Jasmine 5.1.0. I've updated my Jasmine run config template to set NODE_PATH pointing to the top of the projects JavaScript source hierarchy.

Screenshot 2024-02-13 at 9 11 20 PM

Mind sharing details of your environment and Jasmine run configuration? I'm having trouble getting this to work. I still don't see gutter icons, just like with the published 1.8 plugin. My ability to debug is pretty limited because I don't have IntelliJ Ultimate, but I got the following by using the notification mechanism you added to do some logging:

sgravrock commented 9 months ago

Hmm, that's pretty similar to my setup. In any case, I think the error above might be a red herring. I don't get it every time, and the gutter icons are missing even when checkConfiguration succeeds.

It seems like there's more to be done to fully support 2023.3, but since this PR solves the problem for at least you and @enbock and doesn't seem to break anything, I'll go ahead and merge it. Thank you very much.

enbock commented 9 months ago

Hi All,

yes, the icons still missing. But the context menu and shortcuts working fine with this. I using to 90% the shortcuts, so is this change already very helpful.

For comparising, here my project setup image

tingraldi commented 6 months ago

What more needs to be done to get the 1.8.1 release published on the JetBrains Marketplace? The official download page still has version 1.8.

sgravrock commented 6 months ago

I'll do a release soon, once I get a chance to do a bit of final testing.

sgravrock commented 5 months ago

The new release is in JetBrains's moderation queue.