ghcid
ghcid copied to clipboard
If ghcid is started with a compile error it doesn't recognise the test value.
If I start ghcid with the following command with currently compiling code my app starts up fine:
ghcid --command 'cabal new-repl myproject' --setup='import Main' --test=':main'
Should I break something it'll catch that and start up with issue if it's then fixed.
If the code at the point I run the above command doesn't compile and then I subsequently fix it then I see this:
<interactive>:45:53-56: error:
• Variable not in scope: main :: IO a0
• Perhaps you meant ‘min’ (imported from Protolude)
...done
I don't think I've configured it incorrectly, but I'm not 100% certain of that.
The problem is that ghcid
hasn't managed to find the warnings/errors that are coming out of the project. Are you using the latest version of ghcid
? If so, please run with --verbose
, without --test=:main
. Load it working, then break something, and share the log.
It's the other way around though, when it's loaded broken and then fixed.
Hmm. Either way, a log would be interesting. Sometimes GHC fails to reload things, as it's a bit buggy in ghci, but I find that's rare rather than common.