question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"No Cabal file info" error while creating new Haskell project or module

See original GitHub issue

Hello! I get a “No Cabal file info. Could not create Haskell module because could not retrieve or parse Cabal file for package path None” when trying to create a new Haskell project or module using the plugin.

macOS 10.12.6, IntelliJ CE 2017.2.2, IntelliJ-Haskell 1.0.0-beta11 Haskell Platform 8.0.2 installed via homebrew

Stacktrace from IntelliJ:

null
java.lang.NullPointerException
	at intellij.haskell.external.repl.StackReplsManager$.$anonfun$getProjectRepl$1(StackReplsManager.scala:44)
	at scala.Option.flatMap(Option.scala:171)
	at intellij.haskell.external.repl.StackReplsManager$.getProjectRepl(StackReplsManager.scala:44)
	at intellij.haskell.external.component.LoadComponent$.load(LoadComponent.scala:75)
	at intellij.haskell.external.component.HaskellComponentsManager$.loadHaskellFile(HaskellComponentsManager.scala:93)
	at intellij.haskell.annotator.HaskellAnnotator.doAnnotate(HaskellAnnotator.scala:66)
	at intellij.haskell.annotator.HaskellAnnotator.doAnnotate(HaskellAnnotator.scala:42)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doAnnotate(ExternalToolPass.java:211)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.access$500(ExternalToolPass.java:47)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:158)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327)
	at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:277)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:291)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:246)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:246)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:417)
	at com.intellij.util.Alarm$Request.access$700(Alarm.java:344)
	at com.intellij.util.Alarm$Request$1.run(Alarm.java:384)
	at com.intellij.util.Alarm$Request.run(Alarm.java:395)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:237)
	at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

How can I help debug?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
melentyecommented, Aug 21, 2017

Indeed it was a problem with my Stack configuration: I was missing the template params in the ~/.stack/config.yaml.

Thank you for helping me identify the issue. Do you think the IntelliJ-Haskell plugin could do with a more user friendly error message for such a case? Otherwise feel free to reject the ticket.

1reaction
rikvdkleijcommented, Oct 12, 2017

Can you try on the command line: stack new --bare hspec

This command is executed by plugin when creating new project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"No Cabal file info" error while creating new Haskell project ...
Hello! I get a "No Cabal file info. Could not create Haskell module because could not retrieve or parse Cabal file for package...
Read more >
Module works with Cabal but not with Stack
Following one-liner is working for my ghci: nix-shell -p "haskell.packages.ghc8106.ghcWithPackages (p: [p.sbv])" then run ghci and import Data.
Read more >
4.1. Quickstart — Cabal 3.4.0.0 User's Guide
For a library, cabal init looks in the project directory for files that look like Haskell modules and adds all the modules to...
Read more >
User guide - The Haskell Tool Stack
This guide takes a new stack user through the typical workflows. This guide will not teach Haskell or involve much code, and it...
Read more >
Cabal User Guide: Developing Cabal packages
For a library, cabal init looks in the project directory for files that look like Haskell modules and adds all the modules to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found