atom-haskell-archive / haskell-ghc-mod

haskell-ghc-mod atom package
https://atom.io/packages/haskell-ghc-mod
MIT License
69 stars 20 forks source link

Haskell-ghc-mod: ghc-mod failed to launch.It is probably missing or misconfigured. ENOENT #218

Closed mrkaspa closed 6 years ago

mrkaspa commented 6 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.19.0 x64 Electron: 1.6.9 OS: Mac OS X 10.12.3 Thrown From: haskell-ghc-mod package 2.0.6

Stack Trace

Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT

At Error was: Error
spawn ghc-mod ENOENT
Debug information:
{
  "dir": "/Users/mrkaspa/code/GitRankHs",
  "err": {
    "code": "ENOENT",
    "errno": "ENOENT",
    "syscall": "spawn ghc-mod",
    "path": "ghc-mod",
    "spawnargs": [
      "version"
    ],
    "cmd": "ghc-mod version"
  },
  "opts": {
    "cwd": "/Users/mrkaspa/code/GitRankHs",
    "env": {
      "PATH": "/Users/mrkaspa/code/GitRankHs/.stack-work/install/x86_64-osx/lts-9.0/8.0.2/bin:/Users/mrkaspa/.stack/snapshots/x86_64-osx/lts-9.0/8.0.2/bin:/Users/mrkaspa/.stack/programs/x86_64-osx/ghc-8.0.2/bin:/Users/mrkaspa/.rvm/gems/ruby-2.3.1/bin:/Users/mrkaspa/.rvm/gems/ruby-2.3.1@global/bin:/Users/mrkaspa/.rvm/rubies/ruby-2.3.1/bin:/Users/mrkaspa/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/mrkaspa/.rvm/bin"
    },
    "encoding": "utf8",
    "maxBuffer": null
  }
}
Environment (filtered):
{
  "PATH": "/Users/mrkaspa/.rvm/gems/ruby-2.3.1/bin:/Users/mrkaspa/.rvm/gems/ruby-2.3.1@global/bin:/Users/mrkaspa/.rvm/rubies/ruby-2.3.1/bin:/Users/mrkaspa/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Postgres.app/Contents/Versions/latest/bin:/Users/mrkaspa/.rvm/bin"
}

Error
    at CP.execFile (/packages/haskell-ghc-mod/lib/util.js:72:36)
    at exithandler (child_process.js:230:5)
    at ChildProcess.errorhandler (child_process.js:242:5)
    at emitOne (events.js:96:13)
    at ChildProcess.emit (events.js:188:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:213:12)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Commands

Non-Core Packages

atom-elixir 0.2.3 
atom-fix-path 0.1.0 
autocomplete-haskell 1.0.0 
autocomplete-python 1.10.0 
busy-signal 1.4.3 
elm 0.1.0 
file-icons 2.1.10 
git-plus 7.9.3 
haskell-debug 0.3.0 
haskell-ghc-mod 2.0.6 
hyperclick 0.1.3 
ide-haskell 2.0.2 
ide-haskell-cabal 2.0.0 
ide-haskell-hoogle 0.0.6 
ide-haskell-repl 0.7.0 
ink 0.7.4 
intentions 1.1.5 
language-api-blueprint 1.0.2 
language-docker 1.1.8 
language-elixir 0.19.0 
language-elm 1.5.0 
language-haskell 1.12.1 
language-javascript-jsx 0.3.7 
language-protobuf 0.7.1 
language-rust 0.4.12 
linter 2.2.0 
linter-elixir-credo 1.1.0 
linter-elm-make 0.23.7 
linter-eslint 8.2.1 
linter-python 3.1.2 
linter-rust 0.8.0 
linter-ui-default 1.6.4 
MagicPython 1.0.11 
merge-conflicts 1.4.5 
pigments 0.40.2 
python-tools 0.6.9 
racer 0.20.0 
recent-finder 0.5.1 
rustfmt 0.1.3 
sync-settings 0.8.2 
tabs-to-spaces 1.0.3 
trailing-spaces 0.4.0 
lierdakil commented 6 years ago

Atom couldn't find ghc-mod executable. So... yeah. Run stack build ghc-mod.

mrkaspa commented 6 years ago

good thanks

mhdsysy commented 6 years ago

Although i ran stack build ghc-mod in cmd windows 8, i still get the same error any help ?

zenntenn commented 6 years ago

I closed Atom, ran stack build ghc-mod in cmd on my Windows 10 computer, still getting this error linking to this issue.

lierdakil commented 6 years ago

https://atom-haskell.github.io/installation/installing-binary-dependencies/ -- pay very close attention to warnings, those are there for a reason.

Note that ghc-mod is still incompatible with GHC 8.2, which stack uses by default. Stick to lts-9 for now.

mduerig commented 6 years ago

Run stack build ghc-mod

This fails for me:


~$ stack build ghc-mod
Downloaded lts-10.7 build plan.
AesonException "Error in $.packages.cassava.constraints.flags['bytestring--lt-0_10_4']: Invalid flag name: \"bytestring--lt-"```
lierdakil commented 6 years ago

Read my last comment. Ghc-mod still can't handle GHC 8.2. I plastered this everywhere I could think of, and people still ask about it. This is getting tiresome. I don't know how to make it more clear. Maybe read the guide I linked above, I've tried explaining everything in painstaking detail.

Also, you may need to remove ~/.stack (which will reset stack to out-of-the-box state), it seems stackage index got corrupted.

mduerig commented 6 years ago

Also, you may need to remove ~/.stack

Did this, same problem.

For now I'm ditching atom-haskell again. This is way to painful.

pulcheri commented 6 years ago

@lierdakil Thanks for your comments. It looks as the only way to develop haskell apps is the following:

I'm not blaming anyone, but it seems to me that haskell development environment is very immature (compared to F#, Scala). Anyway, thanks to everyone involved for their hard work!

lierdakil commented 6 years ago

@montonero, I'll happily agree that Scala has overall better ecosystem than Haskell. But F#, at least in my opinion, not so much -- I'd say editor support is about the same (comparing ionide for VSCode with Atom-Haskell), and in terms of overall ecosystem, I prefer Haskell's. And I'm using F# at work (occasionally), so that's saying something.

Anyway, there are options available, but those are not really suited for the uninitiated, so to speak. For one, there's a ghc-mod-5.9.0.0 package candidate that's supposed to work with GHC 8.2 -- although it most definitely has bugs.

You're not really locked into ghc-mod either. Some work's being done to support other backends, like haskell-ide-engine (not yet part of Atom-Haskell stack though, see https://atom.io/packages/ide-haskell-hie or https://github.com/atom-haskell/hie-lsp-adapter) and hsdev (see https://github.com/mvoidex/atom-haskell-hsdev). None of those is mature enough to recommend in general but might be worth a look.