haskell / haskell/cabal

`--test-show-details` breaks doctest (and doesn't cause details to be shown)

Open
#7,522 2 comments 0 reactions 0 assignees View on GitHub
blocked: info-needed re: doctest type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**

In repo and commit https://github.com/LambdaHack/LambdaHack/commit/bf40314a785197ac94ae1943db54bc49e0087463 with configured doctest (using the cabal wiring for it), the following works

cabal configure --enable-tests && cabal build . && cabal exec cabal test doctests

while (afterwards) the following

cabal exec cabal test doctests --test-show-details=always

(and the same with any value other than `failure`, which is the default) fails with

```
Test suite doctests: RUNNING...

engine-src/Game/LambdaHack/Server/Commandline.hs:16:1: error:
Could not load module ‘Paths_LambdaHack’
It is a member of the hidden package ‘LambdaHack-0.10.2.0’.
You can run ‘:set -package LambdaHack’ to expose it.
(Note: this unloads all the modules in the current scope.)
it is a hidden module in the package ‘LambdaHack-0.10.2.0’
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
16 | import qualified Paths_LambdaHack as Self (version)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Test suite doctests: FAIL
```

which is totally bogus, but perhaps related to multilib (I can try with a flattened .cabal if helpful).

**To Reproduce**

As above.

**Expected behavior**

Tests should pass and details should be displayed, as requested.

**System information**

Linux, cabal 3.6, GHC 8.10.4, no custom setup, multilib.

**Additional context**

No related issues at https://github.com/sol/doctest AFAICS.

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.