mrcjkb / neotest-haskell

Neotest adapter for Haskell (cabal or stack) with support for Sydtest, Hspec and Tasty
GNU General Public License v2.0
55 stars 4 forks source link

feat: configure build tools #54

Closed saep closed 1 year ago

saep commented 1 year ago
Description of changes

Add a build_tools option. Fixes #51

The default is { 'stack', 'cabal' }. This tries to run tests with stack, if the project contains a stack.yaml and falls back to cabal, if it is a Haskell/cabal project. Since Stack supports multi package projects, this check should is sufficient. I've tested it manually on the hspec project.

If the option is set to just { 'cabal' }, then cabal is always used to run the tests (if the project is a Haskell project).

Since I haven't really done any lua before, I'm looking forward to any suggestions to improve the code.

Things done
saep commented 1 year ago

I've also moved the project and package root logic into select_build_tool. This may also fix #47 ?

mrcjkb commented 1 year ago

I've also moved the project and package root logic into select_build_tool. This may also fix #47 ?

The impure bit checks if the package directory exists on the filesystem. I can probably just remove that.

mrcjkb commented 1 year ago

@all-contributors please add @saep for doc

allcontributors[bot] commented 1 year ago

@mrcjkb

I've put up a pull request to add @saep! :tada: