Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream closed #33

Closed
ParkinWu opened this issue Apr 14, 2016 · 9 comments
Closed

Stream closed #33

ParkinWu opened this issue Apr 14, 2016 · 9 comments

Comments

@ParkinWu
Copy link

I always get this error message,what can I do about it?
Error in communication with ghc-mod: Stream closed. Check if GHC SDK is set and ghc-mod is okay. ghc-mod will not be called for 5 seconds. Command was: check /Users/pzwu/outwork/haskell/yesodtest/app/Main.hs

my config
cabal: /usr/local/bin/cabal
hlint: /Users/pzwu/.cabal/bin/hlint
haskell-docs: /Users/pzwu/.local/bin/haskell-docs
ghc-mod: /Users/pzwu/.cabal/bin/ghc-mod

@rikvdkleij
Copy link
Owner

Check if you can call ghc-mod from command line in root of your Haskell project

@ParkinWu
Copy link
Author

Thank you for your reply,I have tried this ghc-mod command in root of my project
pzwus-imac:yesodtest pzwu$ /Users/pzwu/.cabal/bin/ghc-mod info /Users/pzwu/outwork/haskell/yesodtest/app/Main.hs someFunc
and I got this, does that mean my ghc-mod configuration is correct?
someFunc :: IO () -- Defined at src/Lib.hs:6:1

@rikvdkleij
Copy link
Owner

Yes, can you also try to run:
ghc-mod legacy-interactive
in root of your Haskell project.

@marcgrr
Copy link

marcgrr commented Apr 21, 2016

I think I am having the same problem.

My config is:

ghc-mod: /Users/marc/Library/Haskell/bin/ghc-mod
haskell-docs: /Users/marc/Library/Haskell/bin/haskell-docs
hlint: /Users/marc/Library/Haskell/bin/hlint
cabal: /Users/marc/Library/Haskell/bin/cabal

I have a simple file:

main :: IO ()
main = putStrLn "hello world!"

When I open it, I get these errors in my intellij:

8:03:06 PM Shutting down ghc-mod for project fbm-shirt.
8:03:06 PM Error while shutting down ghc-mod for project fbm-shirt. Error message: Stream closed
8:03:08 PM Starting ghc-mod in interactive mode for project fbm-shirt.
8:03:13 PM Error in communication with ghc-mod: Futures timed out after [5 seconds]. Check if GHC SDK is set and ghc-mod is okay. ghc-mod will not be called for 5 seconds. Command was: check /Users/marc/side_projects/fbm-shirt/app/Main.hs
8:03:18 PM Error in communication with ghc-mod: Stream closed. Check if GHC SDK is set and ghc-mod is okay. ghc-mod will not be called for 5 seconds. Command was: info /Users/marc/side_projects/fbm-shirt/app/Main.hs main
8:03:37 PM Error in communication with ghc-mod: Stream closed. Check if GHC SDK is set and ghc-mod is okay. ghc-mod will not be called for 5 seconds. Command was: info /Users/marc/side_projects/fbm-shirt/app/Main.hs main

I can run these commands in the root directory of my project:

➜  fbm-shirt  ghc-mod info /Users/marc/side_projects/fbm-shirt/app/Main.hs main
main :: IO ()   -- Defined at app/Main.hs:2:1
➜  fbm-shirt

And I can also do it with ghc-mod legacy-interactive:

➜  fbm-shirt  ghc-mod legacy-interactive
info /Users/marc/side_projects/fbm-shirt/app/Main.hs main
main :: IO ()   -- Defined at app/Main.hs:2:1
OK

@rikvdkleij
Copy link
Owner

@ParkinWu @marcgrr Do you use OSX?

@marcgrr
Copy link

marcgrr commented Apr 21, 2016

I do use OSX. I think I have just fixed mine by building the plugin from the latest commit on master! Perhaps one of the latest commits fixes something.

Thanks!!

@rikvdkleij
Copy link
Owner

Yes, I just fixed a problem especially for OSX. PATH has to passed explicitly when running command line programs from IntelliJ

@rikvdkleij
Copy link
Owner

Btw, Cabal is replaced by Stack on master

Also important if you want to download all used packages its source code.

@rikvdkleij
Copy link
Owner

Should be fixed in latest release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants