Skip to content

Running a test watcher alongside haskell-language-server #596

Open
@danbroooks

Description

@danbroooks

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    build tool: stackcan-workaroundtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions