Skip to content
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

Stack failed to configure project when Distribution.Simple.I18N.GetText is used #1299

Closed
gromakovsky opened this issue Nov 6, 2015 · 4 comments

Comments

@gromakovsky
Copy link

I am developing a project which needs internalization and I want to use gettext to achieve this. I have a simple Setup.hs which uses Distribution.Simple.I18N.GetText module from hgettext package:
import Distribution.Simple.I18N.GetText
main = gettextDefaultMain
When I run stack build --reconfigure -v I get the following output: https://gist.github.com/gromakovsky/d0ea603555218ceeed9d
I use build-type: Custom in my .cabal file. I've listed hgettext as build-depends for every target in .cabal file, but still get this error. Relevant parts of my stack.yaml:
resolver: lts-3.11
extra-deps:
- hgettext-0.1.30
After some searching I've found a similar issue: commercialhaskell/stackage#746
A workaround there was just to inline GetText module.
I guess this will work in my case, but I don't think this is a good solution.
By the way, if I use cabal directly, then everything gets installed smoothly.

@mgsloan mgsloan assigned mgsloan and unassigned mgsloan Nov 6, 2015
@gromakovsky
Copy link
Author

Here is a small self-contained example of this: http://git.io/v8nMD
output.txt is output of stack build --reconfigure -v

@mgsloan
Copy link
Contributor

mgsloan commented Nov 8, 2015

Hi, thanks for the report and repro! Once Cabal-1.24 is out, the proper way to resolve this will be haskell/cabal#948 . For now, you will need to use

explicit-setup-deps:
  opasa: true

In your stack.yaml. See #1110 for more info on this, and why it isn't on by default. Here are the docs for explicit-setup-deps

@gromakovsky
Copy link
Author

That worked, thank you very much for a detailed answer.
Sorry for duplicate, I tried my best to find the solution, but it wasn't easy enough :)

@mgsloan
Copy link
Contributor

mgsloan commented Nov 8, 2015

No problem! This stuff is quite strange - the current situation for dependencies of Setup.hs is really ugly. All of the points in the design space we've considered are poor, so this is what we've got for now until Cabal-1.24 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants