Open
Description
Describe the bug
If the build-type: Custom
is used, which is necessary for doctest
, then running ./setup haddock
ends up deleting some files that are necessary for the test-suite to run. Re-running ./setup build
will re-generate the deleted files.
To Reproduce
- Set up a project using
doctest
- Make sure that the
test-suite
target depends on thelibrary
- Run the following commands
ghc Setup.lhs -o setup
./setup configure --enable-tests
./setup build
./setup haddock
./setup test # tests fail
./setup build # the deleted files are re-built
./setup test # tests pass
Please use version-prefixed commands (e.g. `v2-build` or `v1-build`) to avoid ambiguity.
**Expected behavior**
I expect that regardless of the `build-type`, the `test-suite` will pass if indeed the code is sound. I do **not** expect for the `./setup haddock` call to delete anything.
**System information**
- Gentoo Linux
- ghc 8.10.2
- cabal library version 3.2.0.0
**Additional context**
A full working, minimal project can be found [here](https://gitlab.com/ezzieyguywuf/testfailure) which reproduces the error.