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 check failed with error code 1 #111

Closed ChristopherKing42 closed 8 years ago

ChristopherKing42 commented 8 years ago

[Enter steps to reproduce below:]

  1. Run atom in a Haskell Project
  2. Open Haskell Project
  3. Run ghc-mod > check

I installed ghc-mod and cabal-helper with stack, btw. I started atom with atom, but a similar error occurs when doing stack exec -- atom. I also have ghc-modi disabled, since it wasn't working (if you would like to raise an issue on that, I can.)

Atom Version: 1.4.3 System: linux 4.4.1-2-ARCH Thrown From: haskell-ghc-mod package, v1.6.6

Stack Trace

Haskell-ghc-mod: ghc-mod interactive command check failed with error code 1

At caps: {"version":[5,4,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":true,"quoteArgs":false,"optparse":false}
URI: /home/theking/Haskell/tagsoup/Text/HTML/TagSoup/Tree.hs
Args: 
message: ghc-mod: <command line>: cannot satisfy -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
    (use -v for more information)

log:
-8.285s: getProcessOptions(/home/theking/Haskell/tagsoup)
-7.657s: PATH = /home/theking/.stack/snapshots/x86_64-linux/lts-3.19/7.10.2/bin:/home/theking/.stack/programs/x86_64-linux/ghc-7.10.2/bin:/home/theking/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
:/usr/bin/core_perl
-7.355s: {"version":[5,4,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":true,"quoteArgs":false,"optparse":false}
-7.353s: running ghc-mod lang with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-7.334s: running ghc-mod flag with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-7.265s: ghc-mod ended with code 0
-7.265s: ghc-mod ended with code 0
-7.259s: getProcessOptions(/home/theking/Haskell)
-6.785s: PATH = /home/theking/.stack/snapshots/x86_64-linux/lts-3.19/7.10.2/bin:/home/theking/.stack/programs/x86_64-linux/ghc-7.10.2/bin:/home/theking/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
:/usr/bin/core_perl
-6.769s: Trying to run ghc-modi in /home/theking/Haskell
-6.768s: Failed. Falling back to ghc-mod
-6.768s: running ghc-mod check,/home/theking/Haskell/pad.lhs with options.cwd = /home/theking/Haskell,options.env = [object Object],options.encoding = utf-8
-6.621s: ghc-mod ended with code 0
-1.507s: getProcessOptions(/home/theking/Haskell/tagsoup/Text/HTML/TagSoup)
-1.022s: PATH = /home/theking/.stack/snapshots/x86_64-linux/lts-3.19/7.10.2/bin:/home/theking/.stack/programs/x86_64-linux/ghc-7.10.2/bin:/home/theking/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
:/usr/bin/core_perl
-0.552s: Text.HTML.TagSoup.Tree created
-0.552s: Text.HTML.TagSoup.Tree updating
-0.551s: running ghc-mod browse,-d,Text.HTML.TagSoup.Tree with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-0.543s: Text.HTML.TagSoup.Tree buffer is set
-0.541s: Text.HTML.TagSoup created
-0.541s: Text.HTML.TagSoup updating
-0.541s: running ghc-mod browse,-d,Text.HTML.TagSoup with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-0.532s: Text.HTML.TagSoup moduleName mismatch: Text.HTML.TagSoup.Tree != Text.HTML.TagSoup
-0.532s: Text.HTML.TagSoup.Type created
-0.532s: Text.HTML.TagSoup.Type updating
-0.532s: Text.HTML.TagSoup.Type moduleName mismatch: Text.HTML.TagSoup.Tree != Text.HTML.TagSoup.Type
-0.531s: Control.Arrow created
-0.531s: Control.Arrow updating
-0.53s: Control.Arrow moduleName mismatch: Text.HTML.TagSoup.Tree != Control.Arrow
-0.53s: GHC.Exts created
-0.53s: GHC.Exts updating
-0.53s: GHC.Exts moduleName mismatch: Text.HTML.TagSoup.Tree != GHC.Exts
-0.53s: Prelude created
-0.53s: Prelude updating
-0.53s: Prelude moduleName mismatch: Text.HTML.TagSoup.Tree != Prelude
-0.391s: ghc-mod ended with code 0
-0.39s: running ghc-mod browse,-d,Text.HTML.TagSoup.Type with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-0.37s: Text.HTML.TagSoup.Tree updated
-0.351s: Trying to run ghc-modi in /home/theking/Haskell/tagsoup
-0.35s: Failed. Falling back to ghc-mod
-0.35s: running ghc-mod check,/home/theking/Haskell/tagsoup/Text/HTML/TagSoup/Tree.hs with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-0.338s: ghc-mod ended with code 0
-0.338s: running ghc-mod browse,-d,Control.Arrow with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-0.327s: Text.HTML.TagSoup updated
-0.121s: ghc-mod ended with code 0
-0.121s: running ghc-mod browse,-d,GHC.Exts with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-0.095s: Control.Arrow updated
-0.095s: ghc-mod ended with code 0
-0.095s: running ghc-mod browse,-d,Prelude with options.cwd = /home/theking/Haskell/tagsoup,options.env = [object Object],options.encoding = utf-8
-0.083s: Text.HTML.TagSoup.Type updated
-0.002s: ghc-mod said: ghc-mod: <command line>: cannot satisfy -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
-0.002s: ghc-mod said:     (use -v for more information)
-0.001s: ghc-mod ended with code 0
-0.001s: GHC.Exts updated
-0.001s: ghc-mod ended with code 1
0s: code 1: ghc-mod: <command line>: cannot satisfy -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
    (use -v for more information)

code 1: ghc-mod: <command line>: cannot satisfy -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
    (use -v for more information)

    at module.exports.Util.mkError (/home/theking/.atom/packages/haskell-ghc-mod/lib/util.coffee:154:15)
    at BufferedProcess.exit (/home/theking/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process-real.coffee:122:20)
    at triggerExitCallback (/usr/share/atom/resources/app.asar/src/buffered-process.js:213:47)
    at /usr/share/atom/resources/app.asar/src/buffered-process.js:227:18
    at Socket.<anonymous> (/usr/share/atom/resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  },
  "haskell-ghc-mod": {
    "enableGhcModi": false,
    "onChangeCheck": true
  }
}

Installed Packages

# User
autocomplete-haskell, v0.6.2
haskell-ghc-mod, v1.6.6
ide-haskell, v1.3.9
ide-haskell-repl, v0.0.17
language-haskell, v1.5.2
markdown-format, v2.5.1
terminal-plus, v0.14.5

# Dev
No dev packages
lierdakil commented 8 years ago

Try to reconfigure your project manually (i.e. run cabal configure from project directory). You also might want to check package database for consistency. cabal sandbox hc-pkg check and ghc-pkg check will help with that (you can safely ignore haddock warnings)

lierdakil commented 8 years ago

Closing due to age.

Fresheyeball commented 8 years ago

A better error message might be good though. I still run into this quite alot.