commercialhaskell / commercialhaskell/stack

Possible to build test dependencies with different flags to executable dependencies?

Open
#5,230 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

Have posted a question up at [stackoverflow](https://stackoverflow.com/questions/60723447/possible-to-build-dependency-with-different-flags-for-executable-and-tests) but following up here:

Is it possible to build our executables and tests with differently flagged versions of a dependency?

We'd like to run our tests having `vector +UnsafeChecks` to make sure any out of bounds access fails the tests but have executables built against `vector -UnsafeChecks` so that it doesn't have to pay the performance penalties.

Have a `cabal` solution.

```
cabal new-test --constraint="vector +UnsafeChecks" all
```

but nothing for `stack` and couldn't see anything obvious in the docs.

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.