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

Uncaught TypeError: Cannot read property 'map' of undefined #127

Closed ghost closed 8 years ago

ghost commented 8 years ago

Steps to reproduce:

  1. Save any .hs file
  2. Get error message

Atom Version: 1.5.4 System: Mac OS X 10.11.1 Thrown From: haskell-ghc-mod package, v1.11.2

Stack Trace

Uncaught TypeError: Cannot read property 'map' of undefined

At /Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:825

TypeError: Cannot read property 'map' of undefined
    at GhcModiProcess.module.exports.GhcModiProcess.doCheckOrLintBuffer (/Users/maplicant/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:313:71)
    at GhcModiProcess.doCheckOrLintBuffer (/Users/maplicant/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:1:1)
    at GhcModiProcess.module.exports.GhcModiProcess.doLintBuffer (/Users/maplicant/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:362:6)
    at GhcModiProcess.doLintBuffer (/Users/maplicant/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:1:1)
    at GhcModiProcess.module.exports.GhcModiProcess.doCheckAndLint (/Users/maplicant/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:365:50)
    at GhcModiProcess.doCheckAndLint (/Users/maplicant/.atom/packages/haskell-ghc-mod/lib/ghc-mod/ghc-modi-process.coffee:1:1)
    at /Users/maplicant/.atom/packages/haskell-ghc-mod/lib/haskell-ghc-mod.coffee:273:19
    at /Users/maplicant/.atom/packages/haskell-ghc-mod/lib/haskell-ghc-mod.coffee:278:11
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Users/maplicant/.atom/packages/ide-haskell/lib/plugin-manager.coffee:77:18
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Users/maplicant/.atom/packages/ide-haskell/lib/editor-control.coffee:35:16
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1067:27)
    at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:1037:19)
    at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:630:26)
    at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:545:18)
    at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:528:19)
    at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:649:35)
    at atom-workspace.commandRegistry.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/register-default-commands.js:173:32)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:570:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:378:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -0:43.7.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-one-dark-syntax.theme-one-dark-ui)
     -0:30.1.0 script:run-with-profile (atom-text-editor.editor.is-focused)
     -0:27.8.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)
     -0:27.8.0 core:cancel (atom-text-editor.editor.is-focused)
     -0:03.8.0 core:select-all (atom-text-editor.editor.is-focused)
     -0:03.5.0 core:paste (atom-text-editor.editor.is-focused)
  2x -0:03.2.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "haskell-ghc-mod": {
    "additionalPathDirectories": [
      "/Users/maplicant/.cabal/bin"
    ],
    "cabalSandbox": false
  }
}

Installed Packages

# User
autocomplete-haskell, v0.6.3
haskell-ghc-mod, v1.11.2
ide-haskell, v1.5.4
language-haskell, v1.7.5
script, v3.5.2

# Dev
No dev packages
lierdakil commented 8 years ago

I think, Atom might have mishandled an update here. Try uninstalling and reinstalling haskell-ghc-mod package (alternatively, remove .atom/compile-cache/ directory and restart Atom)

lierdakil commented 8 years ago

Closing due to inactivity.