haskell / haskell/cabal

"main-is" misparsed in if/else, only by sdist

Ouverte
#807 8 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Cabal: other Cabal: parser old-milestone: ⊥ type: bug
Langage dominant
Haskell
Étoiles
1.7k
Forks
750
Merge moyen
4 j 3 h
PR mergées (30 j)
28

Description

(Imported from [Trac #817](http://hackage.haskell.org/trac/hackage/ticket/817), reported by @jeffwheeler on 2011-03-22)

An if/else block which sets the main-is value for an executable based on a flag is misparsed when running "cabal sdist" (it's parsed correctly when running "cabal install").

Upon failure, it appears that it's looking for a filename that is the two main-is options concatenated together. E.g., I get the error "cabal: `HackerMain?`.hsMain.hs doesn't exist".

The problematic bit looks like:

if flag(hacking)


main-is: `HackerMain?`.hs

else


main-is: Main.hs

My entire config can be found on hpaste: [http://hpaste.org/44939/yicabal](http://hpaste.org/44939/yicabal) (problematic lines around 268).

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.