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

rouge atom://config node leading to spawn ghc-mod ENOENT #31

Closed cblp closed 6 years ago

cblp commented 9 years ago

rootPath may be a URL, for example, atom://config.

debug info: haskell-ghc-mod debug: PATH = atom://config/.cabal-sandbox/bin:/usr/bin:/home/cblp/b…n:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

lierdakil commented 9 years ago

I've encountered this, but could not track it down If you could provide a test case, that would be great.

lierdakil commented 9 years ago

Alternatively, if you can reproduce this, update to 0.8.2, enable "Debug" in haskell-ghc-mod options, and post dev. console output here.

wridgers commented 9 years ago

I have this problem, using 0.8.3. I am on Windows.

Here's the output from dev. console:

C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: getRootDir path = E:\Dev\haskell\cis194.hs atom.project.getDirectories()[0] = E:\Dev\haskell\cis194.hs buffer.file?.getParent?() = E:\Dev\haskell
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:28 module.exports.Util.getRootDirC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:311 module.exports.GhcModiProcess.doCheckOrLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:348 module.exports.GhcModiProcess.doCheckBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:117 module.exports.IdeBackend.checkBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:93 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:92 lintC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:110 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:109 linter.getLinters.forEach.currentLinterC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:132 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:99 EditorLinter.triggerLintersC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:87 (anonymous function)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: getProcessOptions(E:\Dev\haskell\cis194.hs)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:33 module.exports.Util.getProcessOptionsC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:314 module.exports.GhcModiProcess.doCheckOrLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:348 module.exports.GhcModiProcess.doCheckBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:117 module.exports.IdeBackend.checkBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:93 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:92 lintC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:110 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:109 linter.getLinters.forEach.currentLinterC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:132 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:99 EditorLinter.triggerLintersC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:87 (anonymous function)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: PATH = E:\Dev\haskell\cis194.hs/.cabal-sandbox/bin;C:\Program Files\Haskell\bin;C:\Program Files\Haskell Platform\2014.2.0.0\lib\extralibs\bin;C:\Program Files\Haskell Platform\2014.2.0.0\bin;C:\Python34\;C:\Python34\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Go\bin;C:\TDM-GCC-64\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Git\cmd;E:\Dev\gocode\bin;C:\Program Files\nodejs\;C:\bin;C:\Program Files\Mercurial\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Haskell Platform\2014.2.0.0\mingw\bin;C:\Users\Will Ridgers\AppData\Roaming\cabal\bin;C:\Users\Will Ridgers\AppData\Local\atom\bin;C:\Users\Will Ridgers\AppData\Roaming\npm;/usr/local/bin;/usr/bin;/bin;/usr/sbin;/sbin
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:45 module.exports.Util.getProcessOptionsC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:314 module.exports.GhcModiProcess.doCheckOrLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:348 module.exports.GhcModiProcess.doCheckBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:117 module.exports.IdeBackend.checkBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:93 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:92 lintC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:110 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:109 linter.getLinters.forEach.currentLinterC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:132 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:99 EditorLinter.triggerLintersC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:87 (anonymous function)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: running ghc-mod check,E:\Dev\haskell\cis194.hs with options.cwd = E:\Dev\haskell\cis194.hs,options.env = [object Object]
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-base.coffee:92 module.exports.GhcModiProcessBase.runModCmdC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-temp.coffee:40 module.exports.GhcModiProcessTemp.runC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-temp.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:174 module.exports.GhcModiProcess.runQueuedCommandsC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:137 module.exports.GhcModiProcess.queueCmdC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:312 module.exports.GhcModiProcess.doCheckOrLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:348 module.exports.GhcModiProcess.doCheckBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:117 module.exports.IdeBackend.checkBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:93 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:92 lintC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:110 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:109 linter.getLinters.forEach.currentLinterC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:132 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:99 EditorLinter.triggerLintersC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:87 (anonymous function)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: getRootDir path = E:\Dev\haskell\cis194.hs atom.project.getDirectories()[0] = E:\Dev\haskell\cis194.hs buffer.file?.getParent?() = E:\Dev\haskell
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:28 module.exports.Util.getRootDirC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:311 module.exports.GhcModiProcess.doCheckOrLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:355 module.exports.GhcModiProcess.doLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:136 module.exports.IdeBackend.lintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:93 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:92 lintC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:110 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:109 linter.getLinters.forEach.currentLinterC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:132 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:99 EditorLinter.triggerLintersC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:87 (anonymous function)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: getProcessOptions(E:\Dev\haskell\cis194.hs)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:33 module.exports.Util.getProcessOptionsC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:314 module.exports.GhcModiProcess.doCheckOrLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:355 module.exports.GhcModiProcess.doLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:136 module.exports.IdeBackend.lintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:93 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:92 lintC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:110 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:109 linter.getLinters.forEach.currentLinterC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:132 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:99 EditorLinter.triggerLintersC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:87 (anonymous function)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: PATH = E:\Dev\haskell\cis194.hs/.cabal-sandbox/bin;C:\Program Files\Haskell\bin;C:\Program Files\Haskell Platform\2014.2.0.0\lib\extralibs\bin;C:\Program Files\Haskell Platform\2014.2.0.0\bin;C:\Python34\;C:\Python34\Scripts;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Go\bin;C:\TDM-GCC-64\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Git\cmd;E:\Dev\gocode\bin;C:\Program Files\nodejs\;C:\bin;C:\Program Files\Mercurial\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Haskell Platform\2014.2.0.0\mingw\bin;C:\Users\Will Ridgers\AppData\Roaming\cabal\bin;C:\Users\Will Ridgers\AppData\Local\atom\bin;C:\Users\Will Ridgers\AppData\Roaming\npm;/usr/local/bin;/usr/bin;/bin;/usr/sbin;/sbin
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:45 module.exports.Util.getProcessOptionsC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:314 module.exports.GhcModiProcess.doCheckOrLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:355 module.exports.GhcModiProcess.doLintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:136 module.exports.IdeBackend.lintBufferC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ide-backend.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:93 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\haskell-ghc-mod.coffee:92 lintC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:110 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:109 linter.getLinters.forEach.currentLinterC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:132 (anonymous function)C:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:99 EditorLinter.triggerLintersC:\Users\Will Ridgers\.atom\packages\linter\lib\editor-linter.coffee:87 (anonymous function)
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-base.coffee:134 Using fallback child_process because of spawn C:\WINDOWS\system32\cmd.exe ENOENT
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:18 haskell-ghc-mod debug: running ghc-mod lint,E:\Dev\haskell\cis194.hs with options.cwd = E:\Dev\haskell\cis194.hs,options.env = [object Object]
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 haskell-ghc-mod trace:C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\util.coffee:19 module.exports.Util.debugC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-base.coffee:92 module.exports.GhcModiProcessBase.runModCmdC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-temp.coffee:40 module.exports.GhcModiProcessTemp.runC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-temp.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:174 module.exports.GhcModiProcess.runQueuedCommandsC:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:3 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process.coffee:171 (anonymous function)C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-base.coffee:141 (anonymous function)child_process.js:736 exithandlerchild_process.js:743 errorhandlerevents.js:77 emitOneevents.js:166 emitchild_process.js:1055 ChildProcess._handle.onexitchild_process.js:1127 (anonymous function)node.js:357 _tickCallback
C:\Users\Will Ridgers\.atom\packages\haskell-ghc-mod\lib\ghc-modi-process-base.coffee:134 Using fallback child_process because of spawn C:\WINDOWS\system32\cmd.exe ENOENT

How else can I help?

lierdakil commented 9 years ago

@wridgers, thanks, but according to provided output, you seem to have a different problem, reported in #32. I think this should be fixed in 0.8.4.

wridgers commented 9 years ago

@lierdakil You're absolutely right, my apologies! Thanks.

Centaur commented 9 years ago

Yosemite, atom 1.0.3 , haskell-ghc-mod 0.8.5, dev.console output :

/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getProcessOptions(undefined)
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: PATH = /Users/user/.cabal/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getProcessOptions(undefined)
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: PATH = /Users/user/.cabal/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getProcessOptions(undefined)
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: PATH = /Users/user/.cabal/bin:/usr/bin:/bin:/usr/sbin:/sbin
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/linter-clojure/lib/init.coffee:14 activate linter-clojure
/Users/user/.atom/packages/linter-cpplint/lib/init.coffee:22 activate linter-cpplint
/Users/user/.atom/packages/linter-rust/lib/init.coffee:41 Linter-Rust: package loaded, ready to get initialized by AtomLinter.
/Users/user/.atom/packages/linter-scalac/lib/init.coffee:14 activate linter-scalac
index.js:56 Window load time: 825ms
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getRootDir path = atom://config atom.project.getDirectories()[0] = atom://config buffer.file?.getParent?() = /Users/user
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Main created
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Main updating
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getProcessOptions(atom://config)
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: PATH = atom://config/.cabal-sandbox/bin:/Users/user/.cabal/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/user/.cabal/bin:/usr/local/bin
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getRootDir path = atom://config atom.project.getDirectories()[0] = atom://config buffer.file?.getParent?() = /Users/user
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Main buffer is set
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Prelude created
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Prelude updating
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getProcessOptions(atom://config)
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: PATH = atom://config/.cabal-sandbox/bin:/Users/user/.cabal/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/user/.cabal/bin:/usr/local/bin
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: getRootDir path = atom://config atom.project.getDirectories()[0] = atom://config buffer.file?.getParent?() = /Users/user
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Prelude moduleName mismatch: Main != Prelude
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: running /Users/user/.cabal/bin/ghc-mod browse,-d,Main with options.cwd = atom://config,options.env = [object Object]
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: running /Users/user/.cabal/bin/ghc-mod lang with options.cwd = undefined,options.env = [object Object]
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process-base.coffee:134 Using fallback child_process because of spawn /Users/user/.cabal/bin/ghc-mod ENOENT
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Main updated
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: running /Users/user/.cabal/bin/ghc-mod browse,-d,Prelude with options.cwd = atom://config,options.env = [object Object]
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/ghc-modi-process-base.coffee:134 Using fallback child_process because of spawn /Users/user/.cabal/bin/ghc-mod ENOENT
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: Prelude updated
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: /Users/user/.cabal/bin/ghc-mod ended with code 0
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: running /Users/user/.cabal/bin/ghc-mod flag with options.cwd = undefined,options.env = [object Object]
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:18 haskell-ghc-mod debug: /Users/user/.cabal/bin/ghc-mod ended with code 0
/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 haskell-ghc-mod trace:/Users/user/.atom/packages/haskell-ghc-mod/lib/util.coffee:19 module.exports.Util.debug
lierdakil commented 9 years ago

@Centaur, sorry, traces are completely useless here. Not sure why, but they don't show actual trace. Can you actually reproduce this, or is it a random occurrence? Could you explain how to reproduce this, if possible?

Centaur commented 9 years ago

Every time opening a haskell source file, two red error popups at top-right corner says: "Haskell-ghc-mod: /Users/user/.cabal/bin/ghc-mod -d Main failed with error message Error: spawn /Users/user/.cabal/bin/ghc-mod ENOENT" and "Haskell-ghc-mod: /Users/user/.cabal/bin/ghc-mod -d Prelude failed with error message Error: spawn /Users/user/.cabal/bin/ghc-mod ENOENT" . Main is the module name defined in my source code.

/Users/user/.cabal/bin/ghc-mod does exist. I can run it in the shell.

lierdakil commented 9 years ago

How do you open those files?

Centaur commented 9 years ago

Atom Main Menu -> File -> Open , or dragndrop using mouse, what ever.

lierdakil commented 9 years ago

Makes no sense to me. Probably a quirk in Atom. I'll just try monkey-patching it then.

lierdakil commented 9 years ago

Please check if v0.8.6 fixes this issue.

Centaur commented 9 years ago

Ok. I think I have found out how to reproduce this in 0.8.5

  1. Atom Main Menu -> View -> Toggle TreeView. make sure left treeview is visible
  2. remove any project folder in the left treeview.
  3. Atom Main Menu -> Atom -> Preferences then in the left treeview there is only an empty root node named 'config'. now open any .hs file will trigger the error.
  4. Now right click on the 'config' node in the left treeview and select "remove project folder" then the error disappears.

This is really weird.

lierdakil commented 9 years ago

Thanks. This happens on Linux as well. Funny thing is, if you open preferences with hotkey (ctrl+, on Linux/Win -- not sure what OS X hotkey is), this rouge 'config' node doesn't show up. Doesn't break 0.8.6 for me, thankfully. Could you please confirm this?

Anyway, I think rouge 'config' node is a bug, and is worth reporting upstream. Would you prefer me to do it, or would you rather do it yourself?

Centaur commented 9 years ago

I think it's better you submit the bug report because you know the details much better than me. Thank you very much. 0.8.6 fix this immediate error but I have encountered another exception. I will file a separate issue for that.

3noch commented 9 years ago

I'm getting this on Windows. I'm using stack and GHC 7.10.2 with the latest release of ghc-mod (built with GHC 7.10.2). I've confirmed that ghc-mod check Build.hs works, but opening it in Atom produces a slew of errors like spawn ghc-mod ENOENT. Anything I can do to be helpful?

3noch commented 9 years ago

Could this be helpful for Windows? http://stackoverflow.com/questions/17516772/using-nodejss-spawn-causes-unknown-option-and-error-spawn-enoent-err

dgpratt commented 9 years ago

I'm also encountering this on Windows in basically the same configuration as @3noch. I determined that atom-haskell is launching ghc-mod like ghc-mod "legacy-interactive". I then inferred from the error messages in atom that it was sending a command to ghc-mod like browse -d Site.

I did likewise through a command prompt and this was the output:

ghc-mod.exe: warning: _tzset from msvcrt is linked instead of __imp__tzset
ghc-mod.exe: warning: GetVersionExA from kernel32 is linked instead of __imp_GetVersionExA
ghc-mod.exe: warning: GetModuleHandleA from kernel32 is linked instead of __imp_GetModuleHandleA
ghc-mod.exe: warning: GetProcAddress from kernel32 is linked instead of __imp_GetProcAddress
ghc-mod.exe: warning: _snprintf from msvcrt is linked instead of __imp__snprintf
ghc-mod.exe: warning: GetSystemInfo from kernel32 is linked instead of __imp_GetSystemInfo
ghc-mod.exe: warning: GetSystemMetrics from user32 is linked instead of __imp_GetSystemMetrics
ghc-mod.exe: warning: GetVersionExA from kernel32 is linked instead of __imp_GetVersionExA
ghc-mod.exe: warning: _snprintf from msvcrt is linked instead of __imp__snprintf
ghc-mod.exe: warning: GetSystemInfo from kernel32 is linked instead of __imp_GetSystemInfo
ghc-mod.exe: warning: GetComputerNameA from kernel32 is linked instead of __imp_GetComputerNameA
ghc-mod.exe: warning: CryptAcquireContextA from advapi32 is linked instead of __imp_CryptAcquireContextA
ghc-mod.exe: warning: CryptGenRandom from advapi32 is linked instead of __imp_CryptGenRandom
ghc-mod.exe: warning: _stat64 from msvcrt is linked instead of __imp__stat64
ghc-mod.exe: warning: _open from msvcrt is linked instead of __imp__open
ghc-mod.exe: warning: _stat64 from msvcrt is linked instead of __imp__stat64
ghc-mod.exe: warning: isupper from msvcrt is linked instead of __imp_isupper
ghc-mod.exe: warning: toupper from msvcrt is linked instead of __imp_toupper
ghc-mod.exe: warning: tolower from msvcrt is linked instead of __imp_tolower
ghc-mod.exe: warning: isalpha from msvcrt is linked instead of __imp_isalpha
ghc-mod.exe: warning: isalpha from msvcrt is linked instead of __imp_isalpha
ghc-mod.exe: warning: isalpha from msvcrt is linked instead of __imp_isalpha
ghc-mod.exe: warning: iscntrl from msvcrt is linked instead of __imp_iscntrl
ghc-mod.exe: warning: isupper from msvcrt is linked instead of __imp_isupper
ghc-mod.exe: warning: isgraph from msvcrt is linked instead of __imp_isgraph
ghc-mod.exe: warning: isprint from msvcrt is linked instead of __imp_isprint
ghc-mod.exe: warning: ispunct from msvcrt is linked instead of __imp_ispunct
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalpha from msvcrt is linked instead of __imp_isalpha
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: isalnum from msvcrt is linked instead of __imp_isalnum
ghc-mod.exe: warning: WSACleanup from ws2_32 is linked instead of __imp_WSACleanup
ghc-mod.exe: warning: WSAStartup from ws2_32 is linked instead of __imp_WSAStartup
ghc-mod.exe: warning: WSACleanup from ws2_32 is linked instead of __imp_WSACleanup
ghc-mod.exe: warning: accept from ws2_32 is linked instead of __imp_accept
ghc-mod.exe: warning: inet_ntoa from ws2_32 is linked instead of __imp_inet_ntoa
ghc-mod.exe: warning: getnameinfo from ws2_32 is linked instead of __imp_getnameinfo
ghc-mod.exe: warning: getaddrinfo from ws2_32 is linked instead of __imp_getaddrinfo
ghc-mod.exe: warning: freeaddrinfo from ws2_32 is linked instead of __imp_freeaddrinfo
app :: SnapletInit App App

Is that litany of warnings confusing atom-haskell, or is it likely I'm not seeing the actual issue in this process?

lierdakil commented 9 years ago

@3noch, @dpratt71, could we open new issue for this? Your case is unrelated to what was reported by OP.

lierdakil commented 9 years ago

Nevermind, I figured it out. v0.9.9 should work.

3noch commented 9 years ago

Woot! It's working! Thank you so much!

oreqizer commented 8 years ago

i've encountered this - happens if I create a .hs file in Atom.

if I open it with File > Open, everything works ok

lierdakil commented 8 years ago

@Oreqizer -- what you ran into is not much of an issue. It's not, in general, possible to check/lint/query a Haskell file that doesn't have a filename. I've added a couple checks to avoid unsightly error messages, but newly-created file won't work until you save it. Depending on your setup, you might also need to add it to your cabal file.

oreqizer commented 8 years ago

I just realized that it does not work, it just doesn't start at all - thus no error.

Now, this error is shown:

screen shot 2016-03-19 at 10 42 36

my ghc-mod is installed correctly, tho:

screen shot 2016-03-19 at 10 43 17

is it possible that it works from the terminal, but not in Atom?

lierdakil commented 8 years ago

@Oreqizer -- please see https://github.com/atom-haskell/haskell-ghc-mod#configuration. TL;DR -- unless ghc-mod, ghc etc are not in system PATH, additional setup is required, mostly amounting to telling Atom where to look for said executables.