`cabal sdist` concatenates `main-is`
Open
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
consider the fragment
```
if impl(ghcjs)
main-is: JSMain.hs
else
main-is: Main.hs
```
With cabal 1.24 this causes `cabal sdist` to fail with
```
Building source dist for foo-0.1.0.0...
cabal: JSMain.hsMain.hs doesn't exist
```
@dcoutts says
> this is a bug in the `sdist` code, it's using `flattenPackageDescription` to get both sides of all conditionals to find all files but that doesn't work for `main-is` apparently
/cc @ezyang
Contributor guide
Assessment
This issue has not been assessed yet.