git-annex requires version 2.4.0.1 or later of the 'network' library. Unfortunately, the current version of the Haskell Platform mandates version 2.3.1.0 of that library. This means that git-annex cannot be compiled on the Haskell Platform 2012.4.0.0 (which is going to remain the HP version of choice until May next year or so).

Do you think it's possible to support both versions of the network library, maybe? That would increase the portability of git-annex quite a bit.

Thank you for your consideration.

Ok, I think I've figured out how to use the CPP macros defined by cabal to deal with this. done, will be in next release. --Joey

My code already supports using either, but I don't know how to tell cabal to set -DWITH_OLD_URI to build with the old one, when it's installed. I've in the past tried to deal with this by defining cabal flags, and it didn't work out too well, tending to land users solidly in cabal hell.

You can patch the cabal file like so to make it build with the old network:

--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -52,7 +52,7 @@ Flag DNS
 Executable git-annex
   Main-Is: git-annex.hs
   Build-Depends: MissingH, hslogger, directory, filepath,
-   unix, containers, utf8-string, network (>= 2.4.0.1), mtl,
+   unix, containers, utf8-string, network (< 2.4.0.1), mtl,
    bytestring, old-locale, time,
    pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP,
    base (>= 4.5 && < 4.7), monad-control, transformers-base, lifted-base,
@@ -64,6 +64,7 @@ Executable git-annex
   C-Sources: Utility/libdiskfree.c Utility/libmounts.c
   Extensions: CPP
   GHC-Options: -threaded
+  CPP-Options: -DWITH_OLD_URI
Comment by http://joeyh.name/ Sun Nov 11 21:49:10 2012
Comments on this page are closed.