Closed stevenhood closed 8 years ago
Could you try opening whole project directory in Atom? E.g. atom /path/to/project_dir
ENOTDIR would probably mean that project directory detection fails. My guess is that you open standalone file instead of a project directory. If I'm wrong, please correct me.
I opened the project directory using the full path from the root, but still getting the same error. And yes you're right, I was opening the file instead of the project directory.
That's... weird. Could you check developer console for any messages that might provide some insight?
Each time I save the file I get "Haskell-ghc-mod: ghc-mod failed with error code 1". In the console there are messages starting with Array[0] for each of these errors. Apart from that, there's nothing other than what's already in the report.
Okay, I'm stumped. Let's do a quick sanity check. What versions of ghc-mod and ghc are you running?
I've also released v0.7.6 with more verbose debugging output. You can enable it in haskell-ghc-mod
settings.
Things to check for:
Spawning new ghc-modi instance ... options.cwd=???
running ghc-mod ... with options.cwd=???
You can also copy-paste whole dev. console log here, if you wish. Hopefully that would get us something to understand underlying issue better.
Thanks.
ghc: version 7.8.4 ghc-mod: version 5.2.1.2
GUI: 'ghc-modi' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.
Console:
haskell-ghc-mod debug: Checking for ghc-modi in /home/steven/Programming/99haskellproblems
/home/steven/.atom/packages/haskell-ghc-mod/lib/util.coffee:15 haskell-ghc-mod debug: Spawning new ghc-modi instance for /home/steven/Programming/99haskellproblems with options.cwd = /home/steven/Programming/99haskellproblems,options.env = [object Object]
/home/steven/.atom/packages/haskell-ghc-mod/lib/util.coffee:15 haskell-ghc-mod debug: Running ghc-modi command type,/home/steven/Programming/99haskellproblems/99problems.hs,,2,5
events.js:141 Uncaught Error: write EPIPE
events.js:141 Uncaught Error: spawn ghc-modi ENOENT
That's... different. Another sanity check, is ghc-mod/ghc-modi on your PATH? Either way, could you try to specify full path to ghc-mod and ghc-modi executables in haskell-ghc-mod
settings?
And by the way, /home/steven/Programming/99haskellproblems
is a directory, right?
Yeah it's a directory.
Feel a bit stupid now; realised that I don't have ghc-modi installed! For some reason it wasn't installed when I ran cabal install ghc-mod
. I'll try to reinstall ghc-mod and see if it includes it this time.
Edit: Removed and reinstalled ghc-mod 5.2.1.2, still no ghc-modi included in the install.
@stevenhood, it's been a while. Have you resolved your problem?
I haven't I'm afraid. I tried to reinstall ghc-mod using cabal but ghc-modi never gets installed with it for some reason :/
Well, as a fallback, you can disable ghc-modi
in haskell-ghc-mod
settings (uncheck relevant checkmark). That will be noticeably slow, however.
I have literally no idea how is it possible that ghc-modi
isn't installed. cabal install
installs into $HOME/.cabal/
by default FYI, so you might want to check there. cabal install -g
I think installs into /usr/local
, but on that, I'm not sure.
Turns out ghc-modi
was installed! I was looking in /usr/local
when it was in $HOME/.cabal/
all along. I've since added it to $PATH
, and now I'm not getting any errors related to it any more.
However, I still get Haskell-ghc-mod: /usr/bin/ghc-mod failed with error code 1
each time I save a .hs file.
This could be related to cabal misconfiguration or missing dependencies. Try running cabal configure
in project directory. If it complains about missing dependencies, you can try cabal sandbox init && cabal install --only-dependencies
, which will install sandboxed environment.
Atom Version: 0.209.0 System: Ubuntu 14.04.2 Thrown From: haskell-ghc-mod package, v0.7.5
Stack Trace
Uncaught Error: spawn ENOTDIR
Commands
Config
Installed Packages