Skip to content
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

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

Closed
theophile-scrive opened this issue Aug 1, 2024 · 4 comments · Fixed by #329
Labels
linear Created by Linear-GitHub Sync

Comments

@theophile-scrive
Copy link

theophile-scrive commented Aug 1, 2024

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

@github-actions github-actions bot added the linear Created by Linear-GitHub Sync label Aug 1, 2024
@9999years
Copy link
Member

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
Copy link
Member

Related: #307

@9999years
Copy link
Member

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.

@theophile-scrive
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants