MercuryTechnologies/ghciwatch

"run_ghci: ghci event channel closed" and "run_watcher: No such file or directory (os error 2)"

Opened this issue · 4 comments

What happened?

I am trying to run ghciwatch inside a docker container, but I get the error message:

$ ~/.local/bin/ghciwatch --command="cabal repl my-project"
Error:   × Tasks failed:
  │ • run_ghci: ghci event channel closed
  │ • run_watcher: No such file or directory (os error 2)

What did you expect to happen?

I expect ghciwatch to work

Steps to reproduce the issue

Unfortunately this is on a proprietary codebase. There does not seem to be a verbose option that I can enable to get more logs.

The version of ghciwatch with the bug

ghciwatch 1.0.1

Probably you're missing a --watch ... option to tell it where to look for source files. It uses src by default, so if that's not where you keep your source code it probably crashes like this.

There does not seem to be a verbose option that I can enable to get more logs.

Try --log-filter debug (or trace if that's not enough). The user manual, man page and --help text have some more documentation (but there's a lot of command line options so you'd be forgiven for not noticing them).

Related: #307

Action items here:

  • Better error message when the --watch path isn't found.
  • --verbose and/or --debug flags as shortcuts for --log-filter ghciwatch=debug,info or similar.

Thanks a lot! I indeed thought that the cabal hs-source-dirs would be automagically used, but it's in fact my fault for skimming the blog post. :)

Keep on the good work!