-
Notifications
You must be signed in to change notification settings - Fork 175
ghc-mod with stack: Could not find module ‘.... #668
Comments
You have to delete I know, an option to do it automatically would be nice, sit tight for the next releases :) |
@meditans can you provide some context for this ? what's the purpose of this file etc.. if you know of course |
It's a bunch of caches that we generate from Cabal's LocalBuildInfo stuff. |
See https://github.com/kazu-yamamoto/ghc-mod/blob/master/Language/Haskell/GhcMod/PathsAndFiles.hs#L228S If you look for references to all those binders you'll find the places where the caches are being generated. Presumably they're not being invalidated properly. |
I have a feeling this should have been fixed by a combination of 8568a67 and a12a7fa. @deflexor can you try using master for a while to see if it happens again? AFAIK the problem was that ghc-modi's in-memory cache was not being invalidated but rather written over the external cache files unconditionally. This lead to very strange behavior where |
@deflexor Oh and don't forget to remove all the caches, we're using Just removing |
Checked it with github version of |
I am experiencing this issue with:
Deleting files (running
I see the error for packages defined for test build, but in lib files. For example Everything works when I run stack commands directly. |
I had the same problem haskell/haskell-ide-engine#1006 cleaning up worked for me:
|
How to reproduce:
Create new project with
stack
tool, then open source file in emacs and add line like:import System.Random
Then open repl with
C-c C-l
and it will offer to add packagerandom
to cabal file and restart ghci. After this done repl starts to work fine, but the import line in source buffer is still higlighted with red and if i run from terminalghc-mod check app/Main.hs
then get this error:The text was updated successfully, but these errors were encountered: