Cabal cannot upload hs-source-dirs that only have autogen-modules
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
If a Cabal package has a source directory listed in `hs-source-dirs` that only contains `autogen-modules` then the package cannot be uploaded without a workaround. Specifically: `cabal sdist` will omit the entire source directory when creating the sdist and then `cabal upload` and/or Hackage rejects the package because the sdist is missing the source directory listed in `hs-source-dirs`.
**To Reproduce**
Steps to reproduce the behavior:
```bash
$ cat > autogen-issue.cabal <=1.10
library
build-depends: base >=4.13 && <4.14
hs-source-dirs: src
other-modules: Example
autogen-modules: Example
default-language: Haskell2010
EOF
$ mkdir src
$ cat > ./src/Example.hs <
Contributor guide
Assessment
This issue has not been assessed yet.