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

Looks like ghc-modi craHSed #67

Closed cblp closed 8 years ago

cblp commented 8 years ago
Looks like ghc-modi crahsed
Haskell-ghc-mod: ghc-modi crashed on info with message  in /tmp/hakyll-4.7.4.0
                                                       ^?

Looks like ghc-modi crahsed
Error: This socket is closed.

Atom 1.2.2 haskell-ghc-mod 1.1.5 ghc-mod 5.4.0.0

lierdakil commented 8 years ago

Whelp, apparently it just crashed with no message.

WillSewell commented 8 years ago

I also get this error frequently.

rvion commented 8 years ago

me too

rvion commented 8 years ago

it only crashes when linting is enabled

rvion commented 8 years ago

I have the impression (to be confirmed) that installing latest ghc-mod and hlint with stack --resolver=nightly install hlint ghc-mod fixes the problem

lierdakil commented 8 years ago

Check console after crash. Chances are, there is an error message there with some more information.

apriori commented 8 years ago

@rvion That doesn't seem to fix it for me. So far this bug is kind of getting annoying, because it literally results in a popup spam.

lierdakil commented 8 years ago

@rvion, if it crashes on lint, then error message should read "ghc-modi crashed on _lint_ ...", not "_info_" as in OP.

I really don't have enough information to figure out what is going wrong.

leon1995 commented 8 years ago

I get the same error massage. It says ghc-modi crashed on info with massage /the path from my data witch I have open.

lierdakil commented 8 years ago

Found a race condition that could contribute to this issue. haskell-ghc-mod 1.1.7 should fix it, but I'm not sure it will solve this issue completely. Feedback is appreciated.

wiwa commented 8 years ago

I'm getting this error on 1.2.0. Atom version 1.2.4, ghc-mod 5.4.0.0

lierdakil commented 8 years ago

@WiWa, there may be a legitimate reason why ghc-modi would crash. If you can reproduce this issue consistently, and are convinced that your configuration is correct, I would ask you to share the method.

wiwa commented 8 years ago

How would I make sure my configuration is correct?

lierdakil commented 8 years ago

@WiWa, sorry about late reply, I've been very short on time last week.

Make sure that ghc-pkg check doesn't complain about broken packages. Make sure your cabal project can be configured (cabal configure it from terminal and see the output).

Also, while at it, check if ghc-mod works for your project at all (ghc-mod check main-file.hs and ghc-mod lint main-file.hs, where main-file.hs is path to your project's main file -- executable or library, doesn't really matter).

lierdakil commented 8 years ago

P.S. If your project uses stack, use stack build --only-configure instead of cabal configure

wiwa commented 8 years ago

ghc-mod check and ghc-mod lint both work fine. I can actually get this error editing a simple .hs file without being in a directory with a .cabal file.

ghc-pkg check seems to give a lot of warning: haddock-interfaces and warning: haddock-html: messages for my cabal libraries, that some file its looking for doesn't exist.

lierdakil commented 8 years ago

Haddock warnings are normal. You only should look for something like this near the end of ghc-pkg check output:

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
package-version
package-version
...

One last thing to check if you're on OSX. If you run Atom from terminal, does this error still happen?

wiwa commented 8 years ago

No such message appears. Will report back on opening from terminal.

wiwa commented 8 years ago

Haven't seen the error yet from terminal. Why would it go away? I'm using Ubuntu 14. WIll try on Windows tonight.

Edit: I spoke too soon, got a crash.

What I was doing: Copy and pasted a small section of code from one file to another.

lierdakil commented 8 years ago

@WiWa, running from terminal only makes a difference on OSX (i.e. Mac), due to the fact that environment can change between terminal and launcher there.

Okay, so let me get this straight: ghc-modi apparently crashes every now and again for no good reason. You have no idea on how to make it do that on purpose. Well. Only thing I can suggest at this point is to enable 'Debug' option in haskell-ghc-mod settings, and post dev. console output once it crashes again. Bear in mind, it's quite a lot of output, so use gist or something when (if) posting. You can open dev. console with View → Developer → Toggle Developer Tools

lierdakil commented 8 years ago

Due to updated error reporting capabilities, I'm closing this. If anyone runs into a similar issue, use Atom's built-in issue reporting feature ('Create new issue' button in error message)