-
Notifications
You must be signed in to change notification settings - Fork 848
Problem within repl in a stack project with multiple packages. #1243
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
Comments
My guess is that this is caused by having cabal_macros.h from multiple packages. The best way to mitigate stuff like this is to run What's your stack version? Do these issues persist if you |
I have the exact same problem when using a local package, though I cannot pinpoint exactly what triggers it. |
I have this problem as well with no luck finding the root cause. It would be a big deal for my team if it was fixed since we have a hard time using ghci with stack at all. FWIW, the problematic project has a lot of git dependencies. @mgsloan that suggestion works but is more difficult to use from an an editor (emacs). I think other issues arise when using I'll upgrade and try to provide some version numbers if the problem persists. |
@creichert It might be helpful to put Most of the problems come from attempting to use ghci on multiple packages at once, which isn't really a very principled thing to do. See this ghc ticket on the subject: https://ghc.haskell.org/trac/ghc/ticket/10827 There may still be some bugs where stack could invoke ghci with a better options, but in general loading multiple packages / components is just something that can work, but there are numerous things that can break it. The default behavior of For editor integration, maybe it would be useful to have |
@mgsloan I was using the latest stack, and the issue persisted after the upgrade to the However, all my issues were fixed adding |
Sounds like everyone's problems are resolved, closing. Feel free to open other issues about this stuff. |
Hi, I have three undesired behaviours when using a repl in a stack project which makes use of a package on github in the
packages
section (in my case, a modified version of thehint
package).Firstly, I get this behaviour with
stack ghci
, or using haskell-mode inside emacs: When loading the package (eg. stack ghci) I get a lot of errors like this one:Secondly, inside emacs, I don't seem to be able to use ghc-mod, because of:
Thirdly, as I am using a modified version of
hint
, a source code interpreter, the code of my program is unable to analyze imports outside of base, likeControl.Lens
, while the same program using the unmodifiedhint
package could.Is there a way to correct or mitigate these (probably interconnected) problems?
The text was updated successfully, but these errors were encountered: