haskell / haskell/cabal

Install test executables with cabal install when "--enable-tests" present

Open
#7,693 56 comments 0 reactions 0 assignees View on GitHub
blocked: needs reproducer cabal-install: cmd/install type: enhancement type: user-question
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
Trying to _manually_ (because included `Makefile` forces `v1-` commands) build [Agda](https://github.com/agda/agda.git) from source, I'm getting the following error:

```
$ cabal v2-install --enable-tests --disable-documentation --only-dependencies -fenable-cluster-counting
cabal: --enable-tests was specified, but tests can't be enabled in a remote
package

```

**To Reproduce**
Steps to reproduce the behavior:

```
$ git clone https://github.com/agda/agda.git --recurse-submodules
$ cd agda
$ cabal v2-install --enable-tests --disable-documentation --only-dependencies -fenable-cluster-counting
```

**Expected behavior**
Successful build. I am getting it when I omit `--enable-tests`, but in that case `agda-tests` executable is not built (so, I can't run tests to validate the created executables).

Note, that `cabal v2-build --enable-tests` seems to work fine (but it does not install the executables it builds).

**System information**
- macOS Big Sur 11.6, Xcode-13
- `cabal-3.6.0.0`, `ghc-9.0.1`

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.