alephcloud / hs-configuration-tools

Tools for defining and parsing configurations of Haskell applications
MIT License
23 stars 4 forks source link

configuration-tools-0.2.10 does not compile with GHC 7.8.4 #36

Closed peti closed 9 years ago

peti commented 9 years ago

An attempt to compile ghc --make Setup.hs gives me the following error:

[1 of 1] Compiling Main             ( Setup.hs, /tmp/nix-build-haskell-configuration-tools-0.2.10.drv-0/Main.o )

Setup.hs:334:38:
    ‘licenseFiles’ is not a (visible) field of constructor ‘PackageDescription’
larskuhtz commented 9 years ago

The package requires Cabal version >= 1.20.

(You may compare https://hackage.haskell.org/package/Cabal-1.20.0.0/docs/Distribution-PackageDescription.html https://hackage.haskell.org/package/Cabal-1.18.1.6/docs/Distribution-PackageDescription.html)

larskuhtz commented 9 years ago

I prepared a pull request that enables usage of Cabal < 1.20 at the cost of using CPP in Configuration.Utils.Setup.

You may check out that branch. You can build with cabal. When you compile Configuration.Utils.Setup directly with ghc you may redefine the macro MIN_VERSION_Cabal (search for it in the file, the required change is document). Alternatively you may compile with:

ghc --make Setup.hs -D'MIN_VERSION_Cabal(x,y,z)=0'

larskuhtz commented 9 years ago

The PR is here: https://github.com/alephcloud/hs-configuration-tools/pull/37

peti commented 9 years ago

Hmm, we have a fairly sophisticated infrastructure in place for building Hackage in NixOS. Building branches, applying extra patches, etc. is something that's costly because it doesn't work automatically. If you'll add support for Cabal 1.18.x, then we'll be happy to distribute this package to all Nix users. For the time being, I've disabled the build in our distribution.

larskuhtz commented 9 years ago

I plan to merge this PR as soon as all travis tests pass. Right now there is an bootstrap issue with the travis build that I have to resolve before I can do the merge.

larskuhtz commented 9 years ago

Version 0.2.11 is supports Cabal-1.18 and hopefully fixes this issue.

peti commented 9 years ago

The new version compiles Setup.hs successfully. Thank you very much for your efforts! There remains one problem, though. I'll open a new issue for that in a moment.