commercialhaskell / commercialhaskell/stack
"stack bench" probably shouldn't use "cabal bench", inconsistent GHC_PACKAGE_PATH
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
https://stackoverflow.com/questions/46505007/access-ghc-package-database-in-test-and-benchmark-suite + https://github.com/sgraf812/ghc-package-path point out that there's an inconsistency between the execution of tests and the execution of benchmarks - benchmarks don't see stack's `GHC_PACKAGE_PATH`, whereas tests do. This is because test executables are run directly, whereas benchmark executables are run via cabal. There is an unfortunate cabal misfeature (imho) where it exits immediately if GHC_PACKAGE_PATH is set.
Different to work around this:
1. Fix cabal's behavior for GHC_PACKAGE_PATH
2. Work around cabal's behavior by not using "cabal bench". I think I prefer this. IIRC there was another reason to do this, but I can't seem to find the issue via search.
3. Make cabal test not pass through GHC_PACKAGE_PATH. This would at least make it consistent with benchmarks, but not consistent with `stack exec`. I don't like this option much.
Contributor guide
Assessment
This issue has not been assessed yet.