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 'toString' of null #74

Closed nafizh closed 8 years ago

nafizh commented 8 years ago

[Enter steps to reproduce below:]

  1. Just start writing anything on a new haskell file.
  2. And the errors keep popping up.

Atom Version: 1.3.2 System: Mac OS X 10.10.5 Thrown From: haskell-ghc-mod package, v1.2.3

Stack Trace

Uncaught TypeError: Cannot read property 'toString' of null

At /Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process-redirect.coffee:29

TypeError: Cannot read property 'toString' of null
    at GhcModiProcessRedirect.module.exports.GhcModiProcessRedirect.getRootDir (/Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process-redirect.coffee:29:24)
    at GhcModiProcess.module.exports.GhcModiProcess.getRootDir (/Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process.coffee:226:5)
    at CompletionBackend.module.exports.CompletionBackend.getModuleMap (/Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/completion-backend.coffee:63:5)
    at CompletionBackend.getModuleMap (/Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/completion-backend.coffee:1:1)
    at CompletionBackend.module.exports.CompletionBackend.getSymbolsForBuffer (/Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/completion-backend.coffee:35:29)
    at CompletionBackend.getSymbolsForBuffer (/Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/completion-backend.coffee:1:1)
    at CompletionBackend.module.exports.CompletionBackend.getCompletionsForSymbol (/Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/completion-backend.coffee:179:6)
    at /Users/Nafiz/.atom/packages/haskell-ghc-mod/lib/completion-backend.coffee:1:1
    at SuggestionBuilder.module.exports.SuggestionBuilder.processSuggestions (/Users/Nafiz/.atom/packages/autocomplete-haskell/lib/suggestion-builder.coffee:51:5)
    at SuggestionBuilder.processSuggestions (/Users/Nafiz/.atom/packages/autocomplete-haskell/lib/suggestion-builder.coffee:1:1)
    at SuggestionBuilder.module.exports.SuggestionBuilder.symbolSuggestions (/Users/Nafiz/.atom/packages/autocomplete-haskell/lib/suggestion-builder.coffee:55:6)
    at SuggestionBuilder.symbolSuggestions (/Users/Nafiz/.atom/packages/autocomplete-haskell/lib/suggestion-builder.coffee:1:1)
    at SuggestionBuilder.module.exports.SuggestionBuilder.getSuggestions (/Users/Nafiz/.atom/packages/autocomplete-haskell/lib/suggestion-builder.coffee:94:10)
    at SuggestionBuilder.getSuggestions (/Users/Nafiz/.atom/packages/autocomplete-haskell/lib/suggestion-builder.coffee:1:1)
    at Object.getSuggestions (/Users/Nafiz/.atom/packages/autocomplete-haskell/lib/autocomplete-haskell.coffee:79:49)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:286:56
    at Array.forEach (native)
    at AutocompleteManager.module.exports.AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:265:17)
    at AutocompleteManager.getSuggestionsFromProviders (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61)
    at AutocompleteManager.module.exports.AutocompleteManager.findSuggestions (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:252:19)
    at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/autocomplete-plus/lib/autocomplete-manager.js:3:61

Commands

     -2:24.9.0 core:save-as (atom-text-editor.editor.is-focused)
     -0:41.5.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:41.5.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:41.5.0 editor:indent (atom-text-editor.editor.is-focused)
     -0:40.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:38 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:38 snippets:expand (atom-text-editor.editor.is-focused)
     -0:38 editor:indent (atom-text-editor.editor.is-focused)
     -0:37.6.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:20.1.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:02.1.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -0:02.1.0 snippets:expand (atom-text-editor.editor.is-focused)
     -0:02.1.0 editor:indent (atom-text-editor.editor.is-focused)
  2x -0:01.7.0 core:backspace (atom-text-editor.editor.is-focused)

Config

{
  "haskell-ghc-mod": {
    "ghcModPath": "Users/Nafiz/Library/Haskell/bin/ghc-mod",
    "ghcModiPath": "/Users/Nafiz/Library/Haskell/bin/ghc-modi",
    "additionalPathDirectories": [
      "/Users/Nafiz/Library/Haskell/bin/"
    ]
  }
}

Installed Packages

# User
autocomplete-haskell, v0.6.2
haskell-ghc-mod, v1.2.3
ide-haskell, v1.3.7
language-haskell, v1.5.1

# Dev
No dev packages
kavigupta commented 8 years ago

I have the same issue.

lierdakil commented 8 years ago

I think you're missing a slash at the beginning of ghcModPath setting. 26 дек. 2015 г. 9:52 пользователь "Kavi Gupta" notifications@github.com написал:

I have the same issue.

— Reply to this email directly or view it on GitHub https://github.com/atom-haskell/haskell-ghc-mod/issues/74#issuecomment-167289152 .

nafizh commented 8 years ago

Awesome, that solved the problem. My bad. Many thanks :)