Cannot import project
See original GitHub issueI have just upgraded from beta-8 to beta-10. As was suggested in the release notes, I deleted my project from the project list and attempted to re-import it. I followed through the usual sequence (select folder → select project type → select sdk version) and clicked “Finish”. However, nothing happened after that.
I created a new project under a temporary directory and tried “Import project from existing sources” from the menu. This time, the IDE gave me an error message about an exception in intellij-haskell
with the following traceback:
null
java.lang.NullPointerException
at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:197)
at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:197)
at scala.collection.IndexedSeqOptimized.segmentLength(IndexedSeqOptimized.scala:192)
at scala.collection.IndexedSeqOptimized.segmentLength$(IndexedSeqOptimized.scala:191)
at scala.collection.mutable.ArrayOps$ofRef.segmentLength(ArrayOps.scala:191)
at scala.collection.GenSeqLike.prefixLength(GenSeqLike.scala:94)
at scala.collection.GenSeqLike.prefixLength$(GenSeqLike.scala:94)
at scala.collection.mutable.ArrayOps$ofRef.prefixLength(ArrayOps.scala:191)
at scala.collection.IndexedSeqOptimized.find(IndexedSeqOptimized.scala:49)
at scala.collection.IndexedSeqOptimized.find$(IndexedSeqOptimized.scala:48)
at scala.collection.mutable.ArrayOps$ofRef.find(ArrayOps.scala:191)
at intellij.haskell.util.HaskellProjectUtil$.findCabalFile(HaskellProjectUtil.scala:89)
at intellij.haskell.module.HaskellModuleBuilder$.getCabalFile(HaskellModuleBuilder.scala:168)
at intellij.haskell.module.HaskellModuleBuilder$.createCabalInfo(HaskellModuleBuilder.scala:154)
at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$4(StackProjectImportBuilder.scala:56)
at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$4$adapted(StackProjectImportBuilder.scala:54)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$3(StackProjectImportBuilder.scala:54)
at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$3$adapted(StackProjectImportBuilder.scala:53)
at scala.Option.foreach(Option.scala:257)
at intellij.haskell.module.StackProjectImportBuilder.$anonfun$commit$2(StackProjectImportBuilder.scala:53)
at scala.Option.map(Option.scala:146)
at intellij.haskell.module.StackProjectImportBuilder.commit(StackProjectImportBuilder.scala:52)
at com.intellij.projectImport.ProjectImportBuilder.commit(ProjectImportBuilder.java:60)
at com.intellij.ide.impl.NewProjectUtil.a(NewProjectUtil.java:149)
at com.intellij.ide.impl.NewProjectUtil.createFromWizard(NewProjectUtil.java:76)
at com.intellij.ide.actions.ImportModuleAction.a(ImportModuleAction.java:95)
at com.intellij.ide.actions.ImportModuleAction.a(ImportModuleAction.java:89)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:151)
at com.intellij.ide.actions.ImportModuleAction.createFromWizard(ImportModuleAction.java:89)
at com.intellij.ide.actions.ImportModuleAction.doImport(ImportModuleAction.java:84)
at com.intellij.ide.actions.ImportProjectAction.actionPerformed(ImportProjectAction.java:29)
at com.intellij.ui.components.labels.ActionLink$1.linkSelected(ActionLink.java:67)
at com.intellij.ui.components.labels.LinkLabel.doClick(LinkLabel.java:156)
at com.intellij.ui.components.labels.ActionLink.doClick(ActionLink.java:80)
at com.intellij.ui.components.labels.LinkLabel$MyMouseHandler.mouseReleased(LinkLabel.java:347)
at java.awt.Component.processMouseEvent(Component.java:6541)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6306)
at java.awt.Container.processEvent(Container.java:2237)
at java.awt.Component.dispatchEventImpl(Component.java:4897)
at java.awt.Container.dispatchEventImpl(Container.java:2295)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467)
at java.awt.Container.dispatchEventImpl(Container.java:2281)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4719)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.awt.EventQueue$4.run(EventQueue.java:735)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:645)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
The project in question is https://github.com/input-output-hk/cardano-sl-explorer/ . I have branched away from master
, but otherwise have made no commits and no changes to the working tree.
As I said earlier, I’m running beta10
under Intellij Idea Ultimate 2017.2.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top GitHub Comments
Thank you for taking the time to fix this.
This is new issue but it’s already created, see #209. I have to remove this error message and just ignore those directories which do not contain Cabal file.
Your project is indeed imported successfully.