haskell / haskell/haskell-language-server
Running a test watcher alongside haskell-language-server
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
I have installed HLS and it works great! I have however, come up against a slight issue with my workflow. I have a stack command that I run to watch file changes, and run my test suite on changes, the command is:
```
stack build --fast --test --file-watch --flag app:library-only --flag app:dev
```
This unfortunately conflicts with HLS, as when this command is running and I also have vim open with HLS active, whenever I make a change to a file my test process gets stuck in a loop:
```
app> blocking for directory lock on /home/dan/projects/app/.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build-lock
app> still blocking for directory lock on /home/dan/projects/app/stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build-lock; maybe another Stack process is running?
app> still blocking for directory lock on /home/dan/projects/app/stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build-lock; maybe another Stack process is running?
app> still blocking for directory lock on /home/dan/projects/app/stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build-lock; maybe another Stack process is running?
app> still blocking for directory lock on /home/dan/projects/app/stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1/build-lock; maybe another Stack process is running?
```
Is there a way around this? What is the setup typically for this kind of workflow? Could I use HLS to run the tests on file change? (that is probably beyond the scope of this project...?)
Is there a way I can run stack so that is isn't actively compiling, and just runs the tests every time the tests have re-compiled?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.