Closed
Description
This shows up with the gtk libraries; unsure how general it is.
With a dummy project depending on cairo, a normal stack.yaml
depending on a snapshot correctly (somehow?) infers that gtk2hs-buildtools
must be installed to build cairo
:
$ cat stack.yaml
resolver: lts-2.18
packages:
- '.'
$ stack build --dry-run
Nothing to unregister
Would build:
alex-3.1.4: database=snapshot, source=package index
buildtools-test-0.1.0.0: database=local, source=D:\Projects\buildtools-test\, after: cairo-0.13.1.0
cairo-0.13.1.0: database=snapshot, source=package index, after: gtk2hs-buildtools-0.13.0.4,text-1.2.0.6
gtk2hs-buildtools-0.13.0.4: database=snapshot, source=package index, after: alex-3.1.4,hashtables-1.2.0.2
[..]
But with resolver: ghc-7.10
and manually specified dependencies, it it doesn't figure that out:
$ cat stack.yaml
resolver: ghc-7.10
flags:
text:
integer-simple: false
extra-deps:
- cairo-0.13.1.0
- mtl-2.2.1
- text-1.2.1.1
- utf8-string-1
packages:
- '.'
$ stack build --dry-run
Nothing to unregister
Would build:
buildtools-test-0.1.0.0: database=local, source=D:\Projects\buildtools-test\, after: cairo-0.13.1.0
cairo-0.13.1.0: database=local, source=package index, after: mtl-2.2.1,text-1.2.1.1,utf8-string-1
[..]
That build would fail. Adding gtk2hs-buildtools-0.13.0.4
to the extra-deps
field does not solve the problem.
How does stack
determine that gtk2hs-buildtools is required, and why doesn't that work with the ghc-*
resolver?