Open maksbotan opened 6 years ago
I started to get this error as well:
[Error] Got error while processing diagnostics: readCreateProcess: /home/maks/work/haskell-ide-engine/.stack-work/install/x86_64-linux-ncurses6/lts-11.13/8.2.2/libexec/x86_64-linux-ghc-8.2.2/
How can I debug this?
Bump :)
Does nuking .stack-work
resolve anything?
I've recently moved to a new laptop, so I had clean .stack-work
, but it did not help. In fact, now I'm seeing the new error described in my second comment. This can be due to some changes in HIE or due to the fact that we switched from ghc 8.2 to ghc 8.4.
So I'm sure cleaning .stack-work
won't help now and it's a rather long rebuild.
You said you switched to 8.4 but the error message implies that it is using 8.2, could that be a reason?
Sorry, that was actually 8.0 to 8.2, not 8.2 to 8.4 :)
Specifically, we use LTS-11.13. I've build HIE with stack --resolver=lts-11.13 --stack-yaml=stack-8.2.2.yaml
.
Does that happen with any project you use or just with this one specifically? Is there any way we can reproduce this problem?
Hm... I crafted a simple project with two modules and -dynamic
, hie seems to work fine. I tried adding dependency to qtah
(dynamic-only bindings to Qt), but still could not reproduce the error. Can you suggest something I can try on the actual project?
Tried it once again in our project, here's complete HIE log with --vomit
: https://gist.github.com/maksbotan/412ea588248d05b52a5f399227c59e92
We have three packages, let's call them A, B and C. B and C depend on A, B is ordinary and C is built with -dynamic
. HIE works fine on modules from A and B, but fails on C. I have added -fexternal-interpreter
to -dynamic
packages as earlier errors recommended.
Hmm... After some experimenting I found that HIE should call ghc-mod with -Wwarn
, since it will fail entirely when I have -Werror
in my cabal file, but I'd like to see the exact warning in my editor.
I reverder https://github.com/haskell/haskell-ide-engine/pull/374/files changing Wall
to Wwarn
and it seems to work now.
Also I had to run that long cabal-helper
command with stack exec --
, seems like HIE runs it with some wrong path. How should it be handled properly?
Thanks for -Werror
fix! However, I'm still getting this in log:
[Error] Got error while processing diagnostics: {handle: <file descriptor: 14>}: GHCi.Message.remoteCall: end of file
[Error] Got error while processing diagnostics: ghc-iserv terminated (-11)
[Error] Got error while processing diagnostics: ghc-iserv terminated (-11)
[Error] Got error while processing diagnostics: ghc-iserv terminated (-11)
Overall, hie seems to work rather unstably.
I also sometimes get this:
[Error] Got error while processing diagnostics: ghc-iserv terminated (-11)
[Error] Got error while processing diagnostics: ghc-iserv terminated (-11)
[Error] Got error while processing diagnostics: <no location info>: error:^@ module ‘ariadne-qt-lib-0.2.0.0-JINOphg75A62yePpU5wDS:Ariadne.UI.Qt.Widgets.Dialogs.Send’ is defined in multiple
files: /tmp/ghc-mod15201/Send15200-2.hs^@ /tmp/ghc-mod15202/WalletIn
fo15200-8.hs
Bump! :)
It seems like this issue has to do with the -dynamic flag, right? Have you experienced the same problem when working in other condebases at all?
Yes. I enabled -fexternal-interpreter
as suggested by error from ghc-mod and then this happens. Tried right now with killing .stack-work
in the relevant package.
I open one file -- everything is OK. I open another -- ghc-iserv-dyn
dies. Is there a way to make it output some logs to see what's going on?
@DanielG Do you know anything about this?
When I rename a .hs file, for example:
First.hs --> Program.hs
vscode keep receiving complaints from the lower right corner:
Got error while processing diagnostics: <no location info>: error:
module ‘main:CT’ is defined in multiple files: /tmp/ghc-mod15792/First15791-364.hs
/tmp/ghc-mod15792/Program15791-459.hs
@maksbotan there had been big changes in hie internal architecture, and it doesn't suppot ghc-8.2.2, could you try again to check if the error still stands?
I use HIE with LanguageClient_neovim. Versions:
I build HIE with
$ stack --resolver=lts-11.2 --stack-yaml=stack-8.2.2.yaml install
, since we haveLTS-11.2
in the project I develop.The project consists of a library and an executable in separate Cabal files. The executable is built with
-dynamic
, so I also have to add-fexternal-interpreter
to its Cabal file.However, it seems that HIE can typecheck only the first file I open in nvim. All subsequent files result in
didn't get typechecked module
. Here's a part of log with--debug --vomit
:Also,
ps
indicates thatghc-iserv-dyn
process dies after this. How can I debug this further?