I'm trying to separate the stages of building my package and its dependencies in a sequence of uses of stack build but have become a bit disoriented by all the combinations of flags that seem relevant. My goal is to separately:
- Build package dependencies only
- Build testing dependencies only
- Build the package, only
- Run tests (with everything already built)
stack --resolver XXX build --no-run-tests--no-run-benchmarks --only-dependencies
stack --resolver XXX build --no-run-tests --no-run-benchmarks
stack --resolver XXX build --no-run-tests --no-run-benchmarks --test --bench
stack --resolver XXX build --test --no-run-benchmarks
Which isn't quite the right order and does't feel quite right. I'd also ideally like to have additional steps for documentation:
- Build package dependencies only
- Build testing dependencies only
- Build Haddock dependencies only
- Build the package, only
- Run tests (with everything already built)
- Build Haddock, with doctests
What sequence of commands and combinations of flags would accomplish these steps?