Description
Automatic flags are not automatic in stack. So we have to manually specify them for each gi-*
package. I think it might be possible to work around this by eliminating the enable-overloading
cabal flag.
Haskell gi-*.cabal
files contain:
if flag(enable-overloading)
cpp-options: -DENABLE_OVERLOADING
build-depends: haskell-gi-overloading == 1.0.*
else
build-depends: haskell-gi-overloading == 0.0
We could change this to just:
build-depends: haskell-gi-overloading < 1.1
and replace ENABLE_OVERLOADING
with haskell-gi-overloading_MIN_VERSION(1,0)
Instead of -f-enable-overloading
we would need to use --constraint=haskell-gi-overloading==0.0
.
In stack.yaml
just having
extra-deps:
- haskell-gi-overloading-0.0
Would be enough to switch off overloading.
Another option might be to keep the enable-overloading
flag but only on one package (perhaps haskell-gi
). So haskell-gi.cabal
would have the automatic flag and:
if flag(enable-overloading)
cpp-options: -DENABLE_OVERLOADING
build-depends: haskell-gi-overloading == 1.0.*
else
build-depends: haskell-gi-overloading == 0.0
While all the gi-*.cabal
files would have:
build-depends: haskell-gi-overloading < 1.1
and use haskell-gi-overloading_MIN_VERSION(1,0)
. The stack.yaml
would be:
extra-deps:
- haskell-gi-overloading-0.0
flags:
haskell-gi:
enable-overloading: false
This is not quite as nice.
CC @mgsloan