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 code 1 #99

Closed uncol closed 8 years ago

uncol commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

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 code 1

At caps: {"version":[5,4,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":true,"quoteArgs":false}
URI: /Users/dima/Documents/projects/learning/haskell/servant/servant-examples/tutorial/T1.hs
Args: 
message: ghc-mod: Cannot expand #if directive in file /Users/dima/Documents/projects/learning/haskell/servant/servant-examples/tutorial/T1.hs  at line 21 col 1:

    MIN_VERSION_aeson(a,b,c) is not a defined macro

log:
-0.77s: Trying to run ghc-modi in /Users/dima/Documents/projects/learning/haskell/servant/servant-examples
-0.77s: Failed. Falling back to ghc-mod
-0.77s: running ghc-mod lint,/Users/dima/Documents/projects/learning/haskell/servant/servant-examples/tutorial/T1.hs with options.cwd = /Users/dima/Documents/projects/learning/haskell/servant/servant-examples,options.env = [object Object],options.encoding = utf-8
-0.005s: ghc-mod said: ghc-mod: Cannot expand #if directive in file /Users/dima/Documents/projects/learning/haskell/servant/servant-examples/tutorial/T1.hs  at line 21 col 1:
-0.005s: ghc-mod said:     MIN_VERSION_aeson(a,b,c) is not a defined macro
-0.001s: ghc-mod ended with code 1
0s: code 1: ghc-mod: Cannot expand #if directive in file /Users/dima/Documents/projects/learning/haskell/servant/servant-examples/tutorial/T1.hs  at line 21 col 1:

    MIN_VERSION_aeson(a,b,c) is not a defined macro

code 1: ghc-mod: Cannot expand #if directive in file /Users/dima/Documents/projects/learning/haskell/servant/servant-examples/tutorial/T1.hs  at line 21 col 1:

    MIN_VERSION_aeson(a,b,c) is not a defined macro

    at module.exports.Util.mkError (/Users/dima/.atom/packages/haskell-ghc-mod/lib/util.coffee:154:15)
    at BufferedProcess.exit (/Users/dima/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process-real.coffee:117:20)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:220:18
    at Socket.<anonymous> (/Applications/Atom.app/Contents/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

     -4:31.5.0 custom:toggle-comment-down (atom-text-editor.editor.is-focused)
     -4:20.9.0 core:move-up (atom-text-editor.editor.is-focused)
     -4:20.1.0 custom:toggle-comment-down (atom-text-editor.editor.is-focused)
     -4:19 core:save (atom-text-editor.editor.is-focused)
     -1:35 haskell-ghc-mod:show-info (atom-text-editor.editor.is-focused)
     -1:23 haskell-ghc-mod:show-type (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "packagesWithKeymapsDisabled": [
      "markdown-preview"
    ],
    "themes": [
      "atom-dark-ui",
      "base16-tomorrow-dark-theme"
    ]
  },
  "haskell-ghc-mod": {
    "additionalPathDirectories": [
      "/Users/dima/.local/bin"
    ],
    "debug": true,
    "enableGhcModi": false,
    "onChangeCheck": true,
    "onChangeLint": true,
    "useLinter": true
  }
}

Installed Packages

# User
atom-typescript, v8.1.0
autocomplete-haskell, v0.6.2
haskell-ghc-mod, v1.6.4
haskell-pointfree, v0.1.3
ide-haskell, v1.3.9
language-haskell, v1.5.2
linter, v1.11.3
pretty-json, v0.4.1

# Dev
No dev packages
lierdakil commented 8 years ago

It would seem that you did not install all dependencies, or cabal fails to configure your project for some other reason.

Try running cabal configure for your project and fix stuff Cabal complains about, then try again.

lierdakil commented 8 years ago

Closing due to age