MercuryTechnologies / ghciwatch

Load a GHCi session for a Haskell project and reload it when source files change
https://mercurytechnologies.github.io/ghciwatch/
MIT License
111 stars 10 forks source link

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

Open theophile-scrive opened 2 months ago

theophile-scrive commented 2 months ago

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

9999years commented 2 months ago

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).

9999years commented 2 months ago

Related: #307

9999years commented 2 months ago

Action items here:

theophile-scrive commented 2 months ago

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!