haskell / haskell/cabal

cabal sdist target selector complains on a library name

Open
#6,374 3 comments 0 reactions 0 assignees View on GitHub
attention: pr-welcome cabal-install: cmd/sdist type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**

In source folder with a single package, named `assoc` (as an example)

```
assoc master % cabal v2-sdist assoc
cabal: The component library cannot be packaged for distribution on its own.
Only entire packages may be packaged for distribution.
```

**Expected behavior**

Compare to

```
assoc master % cabal v2-sdist .
Wrote tarball sdist to
/code/public-haskell/assoc/dist-newstyle/sdist/assoc-1.0.1.tar.gz
```

**System information**

```
% cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
```

**Extra notes**

If I have *multi-package* `cabal.project`, than giving a library name works.

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.