Hello all,
I have an issue that has been nagging me for a while, and I'd like to make sure I haven't missed a solution to it.
I'm the maintainer for the buildwrapper package. This package has dependencies on the Cabal and GHC libraries, and also uses the cabal-install executable. For example it will run cabal configure by invoking the executable, then it will load the LocalBuildInfo via the Cabal API, and extract the relevant information to start a GHC session with the proper flags, etc.
Now yesterday some great news were announced, a new version of Cabal!
However, I can't use it. I can of course install the Cabal library and rebuild the cabal executable but
- buildwrapper will only use the version of the Cabal library that was bundled with GHC, since the GHC library has a dependency on that version of Cabal
- so the library access will be using Cabal 1.16, but the executable will be 1.18
- and the library checks when reading the setup-config file that the Cabal versions match. Hence, running configure with 1.18 create build information I can't read back in 1.16.
So I'm stuck. People can easily install cabal 1.18 and build their projects with it, but I can't use it in conjunction with buildwrapper.
Some solutions I've considered
- do not use the Cabal API and write my own code to read the local build info, and to replace all the Cabal library code I use
- do not use the cabal-install executable but do everything by the API
Both solutions reek of madness, and involve rewriting code that others have already written, and a maintenance nightmare with each Cabal release.
So, do I have to wait a new release of GHC/Haskell Platform or is there a better solution? I suspect ghc-mod and other similar packages have the same issues.
Thanks for any help!
--
JP Moresmau
http://jpmoresmau.blogspot.com/