iquiw / company-ghc

Company-mode completion back-end for haskell-mode via ghc-mod
125 stars 6 forks source link

ghc-boot process seems to have failed #17

Closed etanter closed 9 years ago

etanter commented 9 years ago

Hi,

I'm trying to get company-ghc to work, but without success. The diagnostic reports:

* company-ghc backend found: company-ghc
* automatic scan module is enabled
* ghc-boot process seems to have failed

Module                                  Alias               Candidates
-------------------------------------------------------------------------------
Prelude                                 -                        0

So I applied the recommendations:

% ghc-mod root
/Users/etanter/Develop/Haskell
% boot
% check /Users/etanter/Develop/Haskell/Arboles.hs
% check /Users/etanter/Develop/Haskell/Arboles.hs

I find it strange that it says boot above and not ghc-mode boot. Could it be the problem? if so, where to fix that? If not, any idea? Something I can do to dig into the matter?

thanks!

iquiw commented 9 years ago

It is correct behavior that % boot or % check ... is written. However, outputs of their command should follow them when ghc-mod correctly works. Did you run ghc-mod boot in /Users/etanter/Develop/Haskell? If not, please try.

etanter commented 9 years ago

Yes, I did do that, and it gives a huge list of identifiers, which I guess is the expected behavior.

iquiw commented 9 years ago

Ya, ghc-mod boot seems to work. I have no idea about the cause. I suppose it is ghc-mod issue (ghc-modi or ghc-mod's elisp).

etanter commented 9 years ago

Thanks. If you have any further suggestion on how to identify the source of the problem, that'd be very welcome. For now I'm stuck. I installed ghc-mod and company-ghc on another machine (same Mac OS 10.10), and have exactly the same issue...

iquiw commented 9 years ago

Can you check if ghc-modi works?

$ /Users/etanter/Develop/Haskell
$ ghc-modi
boot
etanter commented 9 years ago

ghc-modi seems to work as well, as boot gives me a huge list of symbols.

iquiw commented 9 years ago

So the suspect is ghc-mod's elisp. Which version (MELPA, Hackage, etc.) of ghc-mod are you using?

etanter commented 9 years ago

I have installed emacs packages through MELPA, and haskell packages through cabal.

$ cabal list ghc-mod
* ghc-mod
    Synopsis: Happy Haskell Programming
    Default available version: 5.2.1.2
    Installed versions: 5.2.1.2
    Homepage: http://www.mew.org/~kazu/proj/ghc-mod/
    License:  BSD3

As for emacs packages:

ghc-20150713.400/
company-ghc-20150613.123/ 

Maybe a clue: when I try to run M-x ghc-debug, it complains that ghc-interactive-command is void...

iquiw commented 9 years ago

I got what is happening. MELPA version of ghc-mod uses legacy-interactive argument when calling ghc-mod process. It is not supported by Hackage version of ghc-mod.

So possible solutions are:

etanter commented 9 years ago

brilliant! I used the elisp from MELPA-stable and it works like a charm.

Thank you very much for your help in diagnosing and fixing this!!

iquiw commented 9 years ago

You are welcome :wink: