-
Notifications
You must be signed in to change notification settings - Fork 710
"main-is" misparsed in if/else, only by sdist #807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
(Imported comment by @dcoutts on 2011-03-22) Another example http://hpaste.org/48025 Two problems: one is the way sdist uses flatten, and the other is that monoid instance for main-is concatenates rather than picks the last. sdist should not use flatten, it needs to get the collection of values. |
Sounds... obsolete. Suggest close...? |
Will most likely be subsumed by #2865 which seems like it's going to be getting in sometime soonish. Closing. |
I'd rather keep this open, and check if it really solved. We can (should?) write tests for this kind of regressions before closing. |
Ok, fair enough. I really mostly just wanted to (indirectly) call your attention to this. |
👍 |
@phadej Is this fixed? I just noticed it because I was looking at the GH Projects tab about the Parsec-based parser. That GH Project should probably be closed as well? |
In fact different main-is in different if-else branches still misbehaves, I run into that just recently.
It's not due "missparsing" though.
…Sent from my iPhone
On 27 May 2018, at 18.38, Bardur Arantsson ***@***.***> wrote:
@phadej Is this fixed?
I just noticed it because I was looking at the GH Projects tab about the Parsec-based parser. That GH Project should probably be closed as well?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
(Imported from Trac #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)
else
My entire config can be found on hpaste: http://hpaste.org/44939/yicabal (problematic lines around 268).
The text was updated successfully, but these errors were encountered: