haskell / haskell/cabal

`cabal test` slow because of lack of caching

Open
#8,428 4 comments 0 reactions 0 assignees View on GitHub
type: user-question
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
`cabal test` is slower than running `cabal run tests` when nothing has changed. This issue is exacerbated when using the new [code generators](https://github.com/haskell/cabal/pull/7688) feature, which makes cabal recompile the test suite on every invocation.

**To Reproduce**

Clone https://github.com/gbaz/cabal-doctest-demo.
```bash
$ cabal v2-test
```
Running the second time still recompiles the test suite.
```bash
$ cabal v2-test
```

**Expected behavior**
Cabal should not recompile the entire test suite when nothing has changed.

**System information**
- NixOS 22.05
- Cabal 3.8.1.0
- GHC 9.2.4

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.