I've spent a considerable amount of time [1] now and I don't think we can fix it in a way which works with both network < 2.6 and network >= 2.6/network-uri >=26. In fact I don't know if I can get bootstrap.sh working at all. Without actually using cabal-install to do the dependency/flag resolution and make sure we build using a consistent set of packages we end up in problems like these:
Distribution/Client/HttpUtils.hs:68:43:
Couldn't match expected type ‘network-2.4.2.3:Network.URI.URI’
with actual type ‘URI’
NB: ‘network-2.4.2.3:Network.URI.URI’
is defined in ‘Network.URI’ in package ‘network-2.4.2.3’
‘URI’ is defined in ‘Network.URI’ in package ‘network-uri-2.6.0.1’
In the ‘rqURI’ field of a record
In the expression:
Request
{rqURI = uri, rqMethod = GET,
rqHeaders = Header HdrUserAgent userAgent : ifNoneMatchHdr,
rqBody = ByteString.empty}
The cause is the HTTP package and the Cabal package being compiled against different versions of network. Given how bootstrap.sh works there's no real avoiding this. We can only hope that the user only has one version of network installed.