commercialhaskell / commercialhaskell/stack
Stack ghci on a component of a package does not cause the library component to be built
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
Repro: Run `stack ghci :store-test` on store (after `stack clean`)
Result:
```
store-0.3: configure (lib)
Configuring store-0.3...
store-0.3: initial-build-steps (lib)
The following GHC options are incompatible with GHCi and have not been passed to it: -O2 -threaded
Configuring GHCi with the following packages: store
Using main module: 1. Package `store' component test:store-test with main-is file: /home/mgsloan/fpco/store/test/Spec.hs
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help
: cannot satisfy -package store-0.3
(use -v for more information)
```
The issue is that it needs to build the library in order to be able to load these auxiliary components.
For now, the workaround is to either do a `stack build` first, or load both the library and the component into ghci.
Contributor guide
Assessment
This issue has not been assessed yet.