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

ghcid script at bin/api/ghcid #60

Closed
mwotton opened this issue Aug 11, 2023 · 3 comments · Fixed by #62
Closed

ghcid script at bin/api/ghcid #60

mwotton opened this issue Aug 11, 2023 · 3 comments · Fixed by #62

Comments

@mwotton
Copy link

mwotton commented Aug 11, 2023

ghcid makes for a faster feedback loop than stack test --filewatch, so I've added a script locally. Thought it might be useful? I don't know if there's a better way to detect that other nix-ish things have changed that might necessitate a restart, but perhaps this is helpful.

#!/usr/bin/env bash

args=$@
cmd='ghcid --command stack repl servant-template:lib :servant-template-spec
 $args -T :main --restart=package.yaml --restart=stack.yaml'
bin/util/with-nix $cmd
@marcosh
Copy link
Contributor

marcosh commented Aug 21, 2023

@cgeorgii what do you say? This looks useful to me

@cgeorgii
Copy link
Member

Hey @mwotton and @marcosh. I agree that it's useful to have. Would you mind opening a PR to include it, @mwotton? Thanks!

@cgeorgii
Copy link
Member

cgeorgii commented Aug 30, 2023

@mwotton PR #62 introduces a new way of creating tasks/scripts for the project. I included one task task api:dev that would address your issue.

In summary, once this PR is merged you can start a ghcid session like so:

$ task api:dev
[ ... ]
All good (36 modules, at 14:01:59)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants