haskell / haskell/cabal

`cabal sdist` fails to collect all `main-is`

Open
#3,314 1 comment 0 reactions 0 assignees View on GitHub
Cabal: cmd/sdist Cabal: other re: main type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

Trying to workaround #3313 I exposed a different bug:

instead of making `main-is` conditional, now I made `hs-source-dirs` conditional:

```
main-is: Main.hs
if impl(ghcjs)
hs-source-dirs: src-jsexe
else
hs-source-dirs: src-exe
```

however, `cabal sdist` resulted in a source-tarball containing only the `src-jsexe/Main.hs` but missing the `src-exe/Main.hs` file

(PS: a working workaround here is to use `extra-source-files: src-exe/Main.hs`)

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.