Breaking down stages of Haskell Stack builds

Viewed 37

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:

  1. Build package dependencies only
  2. Build testing dependencies only
  3. Build the package, only
  4. 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:

  1. Build package dependencies only
  2. Build testing dependencies only
  3. Build Haddock dependencies only
  4. Build the package, only
  5. Run tests (with everything already built)
  6. Build Haddock, with doctests

What sequence of commands and combinations of flags would accomplish these steps?

0 Answers
Related