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 interactive command lint failed with error ghc-modi crashed #100

Closed jasonkuhrt closed 8 years ago

jasonkuhrt commented 8 years ago

[Enter steps to reproduce below:]

  1. Open a Haskell file

Atom Version: 1.4.0 System: Mac OS X 10.11.2 Thrown From: haskell-ghc-mod package, v1.6.4

Stack Trace

Haskell-ghc-mod: ghc-mod interactive command lint failed with error ghc-modi crashed

At caps: {"version":[5,5,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":false,"quoteArgs":true}
URI: /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse/source/Morse.hs
Args: 
message: 
log:
-2.215s: getProcessOptions(/Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse)
-1.847s: PATH = /Users/jasonkuhrt/.stack/snapshots/x86_64-osx/lts-3.11/7.10.2/bin:/usr/local/heroku/bin:/Users/jasonkuhrt/.rbenv/shims:/usr/local/opt/gettext/bin:.cabal-sandbox/bin:/Users/jasonkuhrt/Library/Haskell/bin:/Users/jasonkuhrt/google-cloud-sdk/bin:/Users/jasonkuhrt/go/bin:/Users/jasonkuhrt/node_modules/.bin:/Users/jasonkuhrt/bin/eb-cli:/Users/jasonkuhrt/bin:/sbin:/bin:/usr/local/Cellar/python/2.7.2/bin:/usr/local/sbin:/usr/local/bin:/usr/X11/bin:/usr/sbin:/usr/bin:/opt/X11/bin:/usr/local/CrossPack-AVR/bin:/usr/local/git/bin:/usr/local/opt/go/libexec/bin:/usr/local/Cellar/fzf/0.9.12/bin
:/usr/local/Cellar/fzf/0.9.12/bin
-1.678s: Morse created
-1.678s: Morse updating
-1.676s: Morse buffer is set
-1.675s: Data.Map created
-1.675s: Data.Map updating
-1.673s: Data.Map moduleName mismatch: Morse != Data.Map
-1.673s: Prelude created
-1.673s: Prelude updating
-1.671s: Prelude moduleName mismatch: Morse != Prelude
-1.642s: {"version":[5,5,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":false,"quoteArgs":true}
-1.64s: running ghc-mod lang with options.cwd = /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse,options.env = [object Object],options.encoding = utf-8
-1.633s: running ghc-mod flag with options.cwd = /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse,options.env = [object Object],options.encoding = utf-8
-1.628s: running ghc-mod browse,-d,Morse with options.cwd = /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse,options.env = [object Object],options.encoding = utf-8
-1.621s: running ghc-mod browse,-d,Data.Map with options.cwd = /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse,options.env = [object Object],options.encoding = utf-8
-1.081s: ghc-mod ended with code 0
-1.08s: ghc-mod ended with code 0
-1.022s: Trying to run ghc-modi in /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse
-1.022s: Checking for ghc-modi in /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse
-1.022s: Spawning new ghc-modi instance for /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse with options.cwd = /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse,options.env = [object Object],options.encoding = utf-8
-1.021s: Spawning new ghc-modi instance for /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse with options.cwd = /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse,options.env = [object Object],options.encoding = utf-8
-1.016s: Started interactive action block in /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse
-1.015s: Running ghc-modi command lint,/Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse/source/Morse.hs
-0.139s: ghc-mod said: cabal: project.cabal:41: Parse of field 'build-depends' failed.
-0.137s: ghc-mod said: cabal: project.cabal:41: Parse of field 'build-depends' failed.
-0.012s: ghc-modi said: cabal: project.cabal:41: Parse of field 'build-depends' failed.
-0.005s: ghc-modi said: ghc-mod: readCreateProcess: cabal "configure" "--with-ghc=ghc" "--flags" "" (exit 1): failed
-0.001s: ghc-modi for /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse ended with 1
-0.001s: ghc-modi for /Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse ended with 1
0s: Running ghc-modi command unmap-file,/Users/jasonkuhrt/projects/hpfp-answers/chapter-14/morse/source/Morse.hs
0s: ghc-modi crashed

ghc-modi crashed
    at module.exports.Util.mkError (/Users/jasonkuhrt/.atom/packages/haskell-ghc-mod/lib/util.coffee:154:15)
    at ChildProcess.exitCallback (/Users/jasonkuhrt/.atom/packages/haskell-ghc-mod/lib/ghc-mod/interactive-process.coffee:76:20)
    at emitTwo (events.js:92:20)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

Commands

Config

{
  "core": {
    "disabledPackages": [
      "mocha-test-runner",
      "Clean",
      "ide-haskell-hasktags"
    ],
    "themes": [
      "nucleus-dark-ui",
      "atom-dark-fusion-syntax"
    ]
  },
  "haskell-ghc-mod": {
    "useLinter": true
  }
}

Installed Packages

# User
asciidoc-preview, v0.6.0
atom-dark-fusion-syntax, v1.1.0
atomatigit, v1.5.5
autocomplete-haskell, v0.6.2
autosave, v0.23.0
color-picker, v2.0.14
haskell-ghc-mod, v1.6.4
ide-haskell, v1.3.9
ide-haskell-cabal, v1.0.0
ide-haskell-repl, v0.0.17
language-asciidoc, v0.12.0
language-diff, v0.4.0
language-docker, v1.1.6
language-elm, v1.3.2
language-haskell, v1.5.2
language-jade, v0.6.2
language-protobuf, v0.5.0
language-purescript, v0.6.1
language-terraform, v0.7.1
linter, v1.11.3
linter-coffeelint, v1.1.2
linter-eslint, v5.2.7
linter-flow, v4.1.0
linter-hlint, v0.4.2
nucleus-dark-ui, v0.7.3
project-manager, v2.7.3
vim-mode, v0.64.0

# Dev
No dev packages
jasonkuhrt commented 8 years ago

@lierdakil My issue was fixed by your comment https://github.com/atom-haskell/haskell-ghc-mod/issues/99#issuecomment-172359014. It would be nice if this package detected this error case for the user!

DanielG commented 8 years ago

I think you meant @lierdakil

jasonkuhrt commented 8 years ago

@DanielG So sorry, yes. Thanks.