Closed LukaHorvat closed 8 years ago
This same thing hit me today (also windows 10).
Steps to repro: stack new project Open project folder in atom. Open src/Lib.hs, these errors started popping up.
So, technically speaking, this is a problem with ghc-mod that we fixed in 5.5.0.0 (not yet released). In particular, paths with spaces don't always work. That said, I could probably do something about it.
1.5.4 should help somewhat.
Hi, I have the same problem with 1.5.4 on OSX with latest atom
@Softsapiens, please post full error log. To do that, click that small clipboard icon right of 'report/view issue' button, then paste clipboard contents here. Thanks.
For reference:
ok... going for it
[Enter steps to reproduce below:]
Atom Version: 1.3.2 System: Mac OS X 10.11.2 Thrown From: haskell-ghc-mod package, v1.5.4
Haskell-ghc-mod: ghc-mod interactive command info failed with error ghc-modi crashed
At caps: {"version":[5,4,0,0],"legacyInteractive":true,"fileMap":true,"rootExec":true,"quoteArgs":false}
URI: /Users/dani/Code/haskell/servant-example/example.hs
Args: ,list
message:
log:
-0.062s: getProcessOptions(/Users/dani/Code/haskell/servant-example)
-0.062s: PATH = /usr/bin:/bin:/usr/sbin:/sbin
-0.061s: Trying to run ghc-modi in /Users/dani/Code/haskell/servant-example
-0.06s: Checking for ghc-modi in /Users/dani/Code/haskell/servant-example
-0.06s: Spawning new ghc-modi instance for /Users/dani/Code/haskell/servant-example with options.cwd = /Users/dani/Code/haskell/servant-example,options.env = [object Object],options.encoding = utf-8
-0.059s: Spawning new ghc-modi instance for /Users/dani/Code/haskell/servant-example with options.cwd = /Users/dani/Code/haskell/servant-example,options.env = [object Object],options.encoding = utf-8
-0.046s: Started interactive action block in /Users/dani/Code/haskell/servant-example
-0.046s: Running ghc-modi command info,example.hs,,list
-0.004s: ghc-modi said: ghc-mod: cabal: readCreateProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
-0.002s: ghc-modi for /Users/dani/Code/haskell/servant-example ended with 1
-0.001s: ghc-modi for /Users/dani/Code/haskell/servant-example ended with 1
-0.001s: Running ghc-modi command unmap-file,example.hs
0s: ghc-modi crashed
ghc-modi crashed
at module.exports.Util.mkError (/Users/dani/.atom/packages/haskell-ghc-mod/lib/util.coffee:97:15)
at ChildProcess.exitCallback (/Users/dani/.atom/packages/haskell-ghc-mod/lib/ghc-mod/interactive-process.coffee:76:20)
at emitTwo (events.js:92:20)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
{
"core": {
"ignoredNames": [
".git",
".svn",
".DS_Store"
],
"disabledPackages": [
"cabal",
"cabal",
"cabal",
"cabal",
"cabal",
"cabal",
"cabal",
"cabal",
"vim-mode",
"term2"
],
"themes": [
"one-light-ui",
"one-light-syntax"
]
},
"haskell-ghc-mod": {
"ghcModPath": "/Users/dani/.cabal/bin/ghc-mod",
"ghcModiPath": "/Users/dani/.cabal/bin/ghc-modi",
"debug": true
}
}
# User
Ensime, v0.31.1
aligner-php, v1.0.0
atom-dart, v0.7.2
autocomplete-haskell, v0.6.2
autocomplete-php, v0.3.7
emmet, v2.3.17
file-icons, v1.6.13
flex-tool-bar, v0.7.3
git-log, v0.4.1
haskell-ghc-mod, v1.5.4
haskell-pointfree, v0.1.3
hyperclick, v0.0.35
ide-haskell, v1.3.9
jshint, v1.8.3
language-elm, v1.3.1
language-haskell, v1.5.2
language-idris, v0.4.0
language-purescript, v0.6.1
language-scala, v1.1.4
language-swift, v0.4.0
linter, v1.11.3
minimap, v4.19.0
project-manager, v2.7.1
tool-bar, v0.1.10
tool-bar-main, v0.0.8
tree-view-finder, v0.2.1
# Dev
No dev packages
@Softsapiens, this is a different issue. Please read https://github.com/atom-haskell/haskell-ghc-mod#configuration, especially the last paragraph.
yes, I see your point. During the tests I started atom in different ways... usually I open it from terminal, but this last time I made it from the dock.
Now I set the additionalPathDirectories...
Ok, It's not working... but now the package don't crush.
With ghc-modi disabled, I see this log in the console:
haskell-ghc-mod debug: getProcessOptions(/Users/dani/Code/haskell/servant-example)
haskell-ghc-mod debug: PATH = /Users/dani/.cabal/bin:/Users/dani/.local/bin:/Users/dani/.cabal/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/local/MacGPG2/bin:/usr/local/opt/android-sdk/platform-tools:/usr/local/opt/android-sdk/tools
haskell-ghc-mod debug: Trying to run ghc-modi in /Users/dani/Code/haskell/servant-example
haskell-ghc-mod debug: Failed. Falling back to ghc-mod
haskell-ghc-mod debug: running ghc-mod info,/Users/dani/Code/haskell/servant-example/example.hs,,main with options.cwd = /Users/dani/Code/haskell/servant-example,options.env = [object Object],options.encoding = utf-8
haskell-ghc-mod warning: ghc-mod said: EXCEPTION: info:
haskell-ghc-mod warning: ghc-mod said:
And with ghc-modi enabled, the log is:
haskell-ghc-mod debug: getProcessOptions(/Users/dani/Code/haskell/servant-example)
haskell-ghc-mod debug: PATH = /Users/dani/.cabal/bin:/Users/dani/.local/bin:/Users/dani/.cabal/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/local/MacGPG2/bin:/usr/local/opt/android-sdk/platform-tools:/usr/local/opt/android-sdk/tools
haskell-ghc-mod debug: Trying to run ghc-modi in /Users/dani/Code/haskell/servant-example
haskell-ghc-mod debug: Checking for ghc-modi in /Users/dani/Code/haskell/servant-example
haskell-ghc-mod debug: Found running ghc-modi instance for /Users/dani/Code/haskell/servant-example
haskell-ghc-mod debug: Started interactive action block in /Users/dani/Code/haskell/servant-example
haskell-ghc-mod debug: Running ghc-modi command info example.hs ServerT
haskell-ghc-mod warning: ghc-modi said: EXCEPTION: info:
haskell-ghc-mod warning: ghc-modi said:
Basically what you need to take from this is:
cannot satisfy -package-id base-4.8.0.0-9015e10d2b2b0f71f570c3f2bbe09c8a
This usually indicates a problem with ghc packages, a misconfigured cabal project, or traces of builds with other GHC versions... somewhere
Things to try:
cabal configure
your projectcabal clean
and then cabal configure
your projectghc-pkg check
and fix things it complains about (haddock warnings can be safely ignored)I'm using stack.
Globally I've installed ghc 7.10.3, but this project uses locally ghc 7.10.2... slack manages it
Oh. Okay. Then forget everything I said, I have no idea how stack works. That said, try running Atom with stack exec atom
in your project directory. You might want to clean additionalPathDirectories
first, since stack should set environment up by itself, and that might lead to unexpected conflicts.
I'd just like to note that I've upgraded to ghc-mod-5.5.0.0 and have had no issues so far, i.e. this no longer happens to me.
@LukaHorvat thanks for confirming.
It's not working, but now the problem seems to be related with:
@Softsapiens, frankly I can't help much with stack. All I know it sometimes works. And other times, it doesn't. I see no pattern and I don't use it personally, at least not at the moment. Primary problem with stack seems to be basically this: https://github.com/kazu-yamamoto/ghc-mod/issues/615. Also environment, but that's mostly solved by stack exec
.
Totally agree. I think, that's a big problem... because stack is extremely powerful and useful.
I wish it gets working.
Thanks a lot for your help and time!
I get it working now... installing a local ghc-mod via stack in the project, and starting atom through stack exec... no additionalPathDirectories used, stack manages all the paths, as you commented before.
thanks again
I get this error randomly when working on a file. Here's the log
Atom Version: 1.3.2 System: Microsoft Windows 10 Education Thrown From: haskell-ghc-mod package, v1.5.3
Stack Trace
Haskell-ghc-mod: ghc-mod interactive command info failed with error ghc-modi crashed
Commands
Config
Installed Packages