commercialhaskell / commercialhaskell/stack
"stack repl <test suite>" fails if "stack test --no-run-tests" is not run in advance for test suite containing errors
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
### General summary/comments
~~Running the REPL for only the test suite in my project fails with an error saying the library package cannot be satisfied (even though the library builds without errors).~~
Please see https://github.com/commercialhaskell/stack/issues/5380#issuecomment-686731779 for an accurate description of the problem (I didn't realize this was the exact problem when I created this issue).
### Steps to reproduce
1. Run the following commands to clone and build the example repo (the last step results in a compilation error):
```
git clone https://github.com/runeksvendsen/bellman-ford.git
cd bellman-ford
git checkout 781835aa000ad40f6c54f2c7426e9378ff6905e4
stack build
stack test --no-run-tests
```
Now start a REPL for the test suite:
```
stack repl bellman-ford:test:bellman-ford-test
```
### Expected
Not failing with a "_cannot satisfy -package_"-error since the library builds fine.
### Actual
It fails with the following error:
```
: cannot satisfy -package bellman-ford-0.1.0.0
(use -v for more information)
```
Verbose output: https://gist.github.com/runeksvendsen/4ef3125578dc9de82962912be29f2f89
### Stack version
```
$ stack --version
Version 2.3.3, Git revision cb44d51bed48b723a5deb08c3348c0b3ccfc437e x86_64 hpack-0.33.0
```
### Method of installation
* Download from GitHub/Releases, then upgraded via `stack upgrade`
Contributor guide
Assessment
This issue has not been assessed yet.