-
Notifications
You must be signed in to change notification settings - Fork 846
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
GHC options are not passed to GHC when using --ghc-options #796
Comments
This discussion explains a lot of the reasoning around which flags are applied where: https://github.com/commercialhaskell/stack/wiki/FAQ#stack-sometimes-rebuilds-based-on-flag-changes-when-i-wouldnt-expect-it-to-how-come In order to work around that bug in regex-tdfa-text, you'll likely need to check out the package locally, or possibly via the Git packages feature. Adding ghc-options to stack.yaml (something we've been discussing) may help you get a reliable build out of this situation. |
Alright, I've read the discussion here. I'm not sure I understand the definition of "wanted". Shouldn't I actually wanted to build Leksah with Stack, but I cannot do that in a straightforward way due to the |
I've just added this to master and documented it in: https://github.com/commercialhaskell/stack/wiki/stack.yaml#ghc-options Can you try this out and confirm that it works for you? |
Thanks, setting ghc-options in the stack.yaml works.
|
Please see the wiki page, where I've added an explanation. If you have ideas on how to improve the docs on this, please do! Community contributions on this are very welcome. |
When calling for example
stack build regex-tdfa-text --ghc-options -XFlexibleContexts
(a workaround for a bug in that package) the option --ghc-options has no effect and the build fails.It's the same problem as in this thread
I've looked at the sources and the reason is this line. If I change it to
if True
and rebuild Stack, the GHC Options are passed correctly.There's obviously a reason why this check is there, but it doesn't work properly.
The text was updated successfully, but these errors were encountered: