-
Notifications
You must be signed in to change notification settings - Fork 841
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
ghc-mod doesn't work with Stack #1793
Comments
How did you install I got |
I haven't done anything to install
|
Use |
After adding
Is Cabal not receiving the package path at all now? |
Looks like |
@chris-martin - Any reason you have |
@chris-martin You can do I'm pretty sure an old I'm starting to think we should disable that code if ghc-mod is executed via (Also: you really should upgrade to 5.5, lots of bugfixes in there) |
It seems that it adds a
|
@carymrobbins I added
So I assumed it was necessary. |
@DanielG There is |
@chris-martin - You were getting that error because ghc-mod thought that you were using cabal to build due to the existence of a |
I have gotten rid of the |
Adding
|
@chris-martin - May be worth jumping on #ghc-mod on freenode to debug this in real time. |
Here's some of the relevant code (though likely not the root cause): https://github.com/DanielG/ghc-mod/blob/566dbebe298f1e75254a4c3aa07d7410612659d4/Language/Haskell/GhcMod/Cradle.hs#L45 What this means is that if anything goes wrong with ghc-mod's attempt to load your stack project, it'll instead use cabal and not really tell you why. It'd be great if ghc-mod gave informative error message. I don't really follow the logic in the code there, it seems to prefer "cabalCradle" over "sandboxCradle". |
@chris-martin I suggest you upgrade to 5.5 before we do any more debugging. We added another log message for specifically this problem there that should make the problem obvious. Anyways the setup-config files in |
@carymrobbins |
@DanielG Yep, |
Okay, that isn't the problem, then. |
Switched to lts 5.2 for ghc-mod 5.5:
|
I believe |
Okay, added
|
Well, that's just crazy. Seems like something to report to the ghc-mod tracker, that it's attempting to configure cabal-helper rather than installing it and its deps. Ideally we'd also have it use stack to install cabal-helper, to avoid the dependency on cabal-install. |
😓 I'm thinking maybe I'll try to reproduce this in a Docker container later tonight so I can not be the only person in the world who's seen this happen... |
I think ghc-mod attempts to use your user-local .cabal DB, not sure. Maybe it uses its own temp DB (though, in that case I don't see why this wouldn't always be a problem). So, you should be able to do a "cabal install Decimal aeson split text wreq" to populate that with its deps, as a workaround for now. Good idea on making a docker container, I'd also appreciate a working ghc-mod setup. |
@mgsloan Unfortunately that isn't a workaround. On NixOS I have to be using the haskell modules provided by Nix;
|
This mailing list thread seems relevant: https://groups.google.com/forum/#!msg/haskell-stack/_ZBh01VP_fo/0v4SxPw7GwAJ |
@chris-martin a docker image would be lovely actually. I never could get NixOS to work to test ghc-mod with it. |
It seems that the problem is that Cabal doesn't like package dbs specified via |
It seems we have a couple more people experiencing this issue - carymrobbins/intellij-haskforce#285 @DanielG - It's odd that |
Closing as an upstream issue. Please open specific stack issues as additional tickets. |
I've been trying to get any Haskell editor set up, and so far this has blocked me from using Haskforce and SublimeHaskell.
The text was updated successfully, but these errors were encountered: