cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Neutral field (like `extra-files` or `extra-sdist-files`) to add files to `sdist`

Open andreasabel opened this issue 2 years ago • 1 comments

We currently have 3 ways to put extra files into the sdist tarball, but all of these have special semantics:

  1. data-files: files used by the package at runtime
  2. extra-source-files: files that may be used during cabal build (and thus changes might trigger a rebuild)
  3. extra-doc-files: copied by cabal haddock into the documentation folder

Often one of the latter is abused to add files that have no semantics for cabal, like stack*.yaml files to build with stack, or files like READMEs or CHANGELOGs that maybe be regarded by Hackage, but are misplaced in any of the 3 classes.

Suggestion: add a fourth, neutral field for adding files without semantics, e.g.

extra-sdist-files:
  README.md
  CHANGELOG.md
  stack-9.4.4.yaml
  stack-9.2.6.yaml
  ...

Or, make a structured extra-files entry:

extra-files:
  source:
    config.mk  --whatever, I never use this
    ...
  doc:
    ... -- lacking imagination here as well
  other:
    CHANGELOG.md
    README.md
    stack-9.4.4.yaml
    ...

Lifted from:

  • #8756

andreasabel avatar Feb 27 '23 08:02 andreasabel

I support this idea and would be in need of such a field.

dio4ev avatar Feb 27 '24 07:02 dio4ev