commercialhaskell / commercialhaskell/stack
Possible to build test dependencies with different flags to executable dependencies?
- 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
Assessment
This issue has not been assessed yet.