haskell / haskell/cabal

Cannot install only one of many executables in a package.

Open
#8,614 8 comments 2 reactions 1 assignee Claimed by @zlonast View on GitHub
attention: pr-welcome cabal-install: cmd/install re: target type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

## Describe the bug

I cannot install only one of many executables in a package. All of them get built and installed at once.

## To Reproduce
Steps to reproduce the behavior:

Create a trivial package with 2 executables. Ask Cabal to install some one of them.

```
% cabal install example1 --installdir /tmp/executables
Wrote tarball sdist to /tmp/example/dist-newstyle/sdist/example-0.1.0.0.tar.gz
Resolving dependencies...
Up to date
Symlinking 'example1' to '/tmp/executables/example1'
Symlinking 'example2' to '/tmp/executables/example2'
% ls /tmp/executables
example1 example2
```

I never asked for `example2`!

## Expected behavior

Exactly one executable that I named is built and installed.

**System information**
- Standard issue Linux.
- `cabal-install version 3.8.1.0`.

## Additional context

This should have been solved in #6369?…

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.