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 command lint failed with error code 1 #108

Closed ChristopherKing42 closed 8 years ago

ChristopherKing42 commented 8 years ago

[Enter steps to reproduce below:]

  1. Open Haskell File
  2. Hit lint

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 command lint failed with error code 1

At caps: {"version":[5,5,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":false,"quoteArgs":true,"optparse":true}
URI: /home/theking/Haskell/pad.lh
Args: --
message: ghc-mod: Couldn't find file: HLint
Tried with:
  HLint
  HLint.hs

  /usr/share/hlint/HLint
  /usr/share/hlint/HLint.hs

log:
-4.796s: getProcessOptions(/home/theking/Haskell)
-3.873s: 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:~/.local/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/TheKing/local/.bin
:/home/TheKing/local/.bin
-3.615s: {"version":[5,5,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":false,"quoteArgs":true,"optparse":true}
-3.613s: running ghc-mod lang,-- with options.cwd = /home/theking/Haskell,options.env = [object Object],options.encoding = utf-8
-3.6s: running ghc-mod flag,-- with options.cwd = /home/theking/Haskell,options.env = [object Object],options.encoding = utf-8
-3.536s: ghc-mod ended with code 0
-3.536s: ghc-mod ended with code 0
-0.037s: running ghc-mod --map-file,/home/theking/Haskell/pad.lh,lint,/home/theking/Haskell/pad.lh,-- with options.cwd = /home/theking/Haskell,options.env = [object Object],options.encoding = utf-8
-0.029s: sending stdin text to ghc-mod
-0.003s: ghc-mod said: ghc-mod: Couldn't find file: HLint
-0.003s: ghc-mod said: Tried with:
-0.003s: ghc-mod said:   HLint
-0.003s: ghc-mod said:   HLint.hs
-0.002s: ghc-mod said:   /usr/share/hlint/HLint
-0.002s: ghc-mod said:   /usr/share/hlint/HLint.hs
-0.001s: ghc-mod ended with code 1
0s: code 1: ghc-mod: Couldn't find file: HLint
Tried with:
  HLint
  HLint.hs

  /usr/share/hlint/HLint
  /usr/share/hlint/HLint.hs

code 1: ghc-mod: Couldn't find file: HLint
Tried with:
  HLint
  HLint.hs

  /usr/share/hlint/HLint
  /usr/share/hlint/HLint.hs

    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

     -0:00.9.0 haskell-ghc-mod:lint-file (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "solarized-dark-syntax"
    ]
  }
}

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

My hlint is in ~/.local/bin, which is in Path, but not in /usr/share/HLint.

lierdakil commented 8 years ago

Seems like your ghc-mod installation is horribly broken, since it basically can't find parts of itself (or rather, Haskell libraries it links against).

ChristopherKing42 commented 8 years ago

What, I just so happened to install with stack, cabal, and my package manager. In other news, I'm stupid. I think I did it the right way, but know I'm getting another error. I'll raise it as another issue.