haskell / haskell/cabal

`install --lib` doesn't work with multi-lib packages

Open
#9,074 0 comments 0 reactions 0 assignees View on GitHub
re: install --lib type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

While `cabal install --lib` has often been spoken about as being barely-supported, it mostly works pretty well these days. However, as far as I can tell, it seems to be impossible to install from packages with multiple public libraries (aside from installing the "main" library from that package):

```console
$ cabal install --dry --package-env . --lib spotify:spotify-servant
Resolving dependencies...
Error: cabal: Cannot build the executable spotify-servant from the package
spotify, because the package does not contain a executable with that name.

$ cabal install --dry --package-env . --lib spotify:lib:spotify-servant
Downloading spotify:lib:spotify-servant
Error: cabal: '/usr/bin/curl' exited with an error:
curl: (3) URL rejected: Port number was not a decimal number between 0 and
65535
```

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.