ghc-mod fails if project's cabal file contains both a library and an executable that depends on that library #501
Comments
Please upgrade cabal-helper to at least 0.3.6.0 and recompile ghc-mod. |
I tried installing cabal-helper 0.3.6.0 into my ghc-mod sandbox, but that triggered a ghc-mod-5.2.1.2 install and I got the following error:
Full output: https://gist.github.com/beala/c8303e4c4be73004b55a Then I instead went into the This successfully compiled, but I'm still getting the same error when I run This is what's currently installed in my ghc-mod sandbox:
|
|
Blew away my project's dist/ and sandbox and re-ran
It is possible this has something to do with the |
I'm pretty sure your installation still hasn't picked up the updated cabal-helper, the -inplace dep shouldn't be there at all. |
I tried building ghc-mod from master again with a brand new local clone:
Then I copy the binaries from I'm able to reproduce the issue with this simple repo containing one executable target and one lib: https://github.com/beala/test
Is there any other info I can provide? Here is ghc-mod's debug output in my test project:
|
@DanielG I'm hitting the exact same As of earlier today, I've tried:
Also, I'll run debug on it's own dir to verify if the correct version of cabal-helper was picked up. Let me know if/how I can lend a hand with this. 4.1.6
master
|
I can also reproduce this error on a clean Arch Linux install. Steps to reproduce, from a fresh, working install:
Package versions: Output from
|
Should be fixed now: DanielG/cabal-helper@c80fc64 Just pull the latest version from master. Can you confirm? |
@DanielG that fixed it & the ghc-mod based company-mode backend now works as well! Thanks so much! |
Awesome :3 |
Here is the cabal file in question: https://github.com/beala/twitter-markov/blob/5cbb3ee7bab7b87882110fe808ddce9582a5bded/twitter-markov.cabal
What's important is that it declares an executable called twitter-markov, and, in the same file, a library that the executable depends on. I can successfully build and install this project with a sandbox using
cabal sandbox init && cabal install
. When I try to run ghc-mod I get:I get the same error if I run it with
cabal exec -- ghc-mod boot
.Version info:
ghc-mod: Built from master (bfa0b96)
ghc: 7.10.1 (installed from https://ghcformacosx.github.io/)
cabal: 1.22
OS X: 10.10.3
The text was updated successfully, but these errors were encountered: