commercialhaskell / commercialhaskell/stack

Make stack kill executed process when running `stack build --file-watch --exec "foo"`

Open
#1,765 6 comments 20 reactions 0 assignees View on GitHub
help wanted type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

When I am programming a long running application (like a web api), I'd like to have a feature where the program that has been executed after building is killed when a source code change is found.

For example, I am building an api using Servant and I would like to run it like this:

```
$ stack build --file-watch --exec "stack exec -- my-api"
```

Everytime I change one of my source files, it would be nice if `stack` automatically killed and restarted `my-api`.

Currently `stack` just waits until `my-api` is finished running (which never happens).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.