haskell / haskell/cabal

'cabal sdist' doesn't check whether the .cabal file has changed

Open
#2,744 0 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

The `cabal build` command checks whether the `.cabal` file has been changed, and if so, reconfigures.
`cabal sdist` does not do this check, which can lead to errors.

```
$ cabal --version
cabal-install version 1.22.6.0
using version 1.22.4.0 of the Cabal library
```

```
$ cabal sdist
Distribution quality warnings:
'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit
and not just imposing longer compile times on your users.
Building source dist for binary-0.7.6.1...
Preprocessing library binary-0.7.6.1...
Preprocessing test suite 'qc' for binary-0.7.6.1...
Preprocessing test suite 'read-write-file' for binary-0.7.6.1...
Preprocessing benchmark 'bench' for binary-0.7.6.1...
Preprocessing benchmark 'get' for binary-0.7.6.1...
cabal: internal error: the package description contains no component corresponding to CBenchName "cabal-bench"
kolmodin ~/code/binary $ cabal configure
Resolving dependencies...
Configuring binary-0.7.6.1...
kolmodin ~/code/binary $ cabal sdist
Distribution quality warnings:
'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit
and not just imposing longer compile times on your users.
Building source dist for binary-0.7.6.1...
Preprocessing library binary-0.7.6.1...
Source tarball created: dist/binary-0.7.6.1.tar.gz
```

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.