Open rillig opened 2 years ago
I actually have Haskel installed via GHCup, and I still have the same exception when attempting to create a new empty Haskel module.
The following is installed via GHCup:
GHCup 0.1.18.0
Stack 2.7.5
HLS 1.7.0.0
cabal 3.6.2.0
GHC 8.10.7
I can compile .hs
files manually and use the interactive ghci
interpretator.
The following warning is displayed in the dialogue when creating a new project:
Error adding module to project: Couldn't create Haskell module due to failure retrieving or parsing Cabal file for package path `/Users/dy1ng/Repos/HaskelTest1`
A snippet from the idea.log
:
2022-09-06 14:38:09,946 [ 17315] SEVERE - #c.i.o.a.i.ApplicationImpl - Unknown error while creating new Stack project by using Stack command for creating new project on file system
java.lang.Exception: Unknown error while creating new Stack project by using Stack command for creating new project on file system
at intellij.haskell.module.HaskellModuleBuilder.$anonfun$createStackProject$1(HaskellModuleBuilder.scala:152)
at intellij.haskell.util.ScalaUtil$.$anonfun$runnable$1(ScalaUtil.scala:35)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:297)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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)
2022-09-06 14:38:09,948 [ 17317] SEVERE - #c.i.o.a.i.ApplicationImpl - IntelliJ IDEA 2022.2.1 Build #IU-222.3739.54
2022-09-06 14:38:09,948 [ 17317] SEVERE - #c.i.o.a.i.ApplicationImpl - JDK: 17.0.3; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2022-09-06 14:38:09,948 [ 17317] SEVERE - #c.i.o.a.i.ApplicationImpl - OS: Mac OS X
2022-09-06 14:38:09,949 [ 17318] SEVERE - #c.i.o.a.i.ApplicationImpl - Plugin to blame: IntelliJ-Haskell version: 1.0.0-beta88
2022-09-06 14:38:09,969 [ 17338] WARN - #c.i.i.u.p.ModuleBuilder - Couldn't create Haskell module due to failure retrieving or parsing Cabal file for package path `/Users/dy1ng/Repos/HaskelTest1`
java.lang.Exception: Couldn't create Haskell module due to failure retrieving or parsing Cabal file for package path `/Users/dy1ng/Repos/HaskelTest1`
at intellij.haskell.module.HaskellModuleBuilder.setupRootModel(HaskellModuleBuilder.scala:82)
at com.intellij.ide.util.projectWizard.ModuleBuilder.setupModule(ModuleBuilder.java:281)
at intellij.haskell.module.HaskellModuleBuilder.createModule(HaskellModuleBuilder.scala:109)
at com.intellij.ide.util.projectWizard.ModuleBuilder.createAndCommitIfNeeded(ModuleBuilder.java:312)
at com.intellij.ide.util.projectWizard.ModuleBuilder.lambda$commitModule$4(ModuleBuilder.java:356)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1011)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1037)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commitModule(ModuleBuilder.java:355)
at com.intellij.platform.templates.TemplateModuleBuilder.commitModule(TemplateModuleBuilder.java:140)
at com.intellij.ide.util.projectWizard.ModuleBuilder.commit(ModuleBuilder.java:342)
at com.intellij.ide.impl.NewProjectUtil.doCreate(NewProjectUtil.java:184)
at com.intellij.ide.impl.NewProjectUtil.createFromWizard(NewProjectUtil.java:92)
at com.intellij.ide.impl.NewProjectUtil.createFromWizard(NewProjectUtil.java:87)
at com.intellij.ide.impl.NewProjectUtil.createNewProject(NewProjectUtil.java:74)
at com.intellij.ide.actions.NewProjectAction.actionPerformed(NewProjectAction.java:25)
at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:315)
at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:294)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:337)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:294)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenActionsUtil.performAnActionForComponent(WelcomeScreenActionsUtil.java:96)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeScreenActionsUtil$ToolbarTextButtonWrapper$1.actionPerformed(WelcomeScreenActionsUtil.java:56)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392)
at java.desktop/java.awt.Component.processEvent(Component.java:6413)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:840)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Same here. But in my case ghc/stack were installed via chocolatey on Windows. Calling those manually works
Have Haskell installed via stack. Am getting this issue as well.
I have IntelliJ IDEA installed and installed the Haskell plugin. Then I tried to create a new project. It resulted in this error message:
I had expected that the Haskell plugin would detect that I don't have Haskell installed yet (I'm a beginner in Haskell) and would offer some useful link or action for downloading a Haskell environment.