summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-03-10 15:49:14 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-03-10 15:49:14 -0400
commit7204a6774d81b681be9ea4733596dd58a05906b1 (patch)
tree91abc35dee2ec1227922a8a3d1c1f7fec928d24c
parentbfad6f5a7d156d5ddf0e5cf3840d8d22f82a2377 (diff)
Drop support for building with old versions of dns and http-conduit.
-rw-r--r--CHANGELOG1
-rw-r--r--Utility/SRV.hs9
-rw-r--r--Utility/Url.hs8
-rw-r--r--git-annex.cabal4
4 files changed, 4 insertions, 18 deletions
diff --git a/CHANGELOG b/CHANGELOG
index c697d0869..3d7620922 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -14,6 +14,7 @@ git-annex (6.20170301.2) UNRELEASED; urgency=medium
* Windows: Improve handling of shebang in external special remote
program, searching for the program in the PATH.
* Drop support for building without network-uri.
+ * Drop support for building with old versions of dns and http-conduit.
-- Joey Hess <id@joeyh.name> Thu, 02 Mar 2017 12:51:40 -0400
diff --git a/Utility/SRV.hs b/Utility/SRV.hs
index 033064a27..64cca6060 100644
--- a/Utility/SRV.hs
+++ b/Utility/SRV.hs
@@ -5,8 +5,6 @@
- License: BSD-2-clause
-}
-{-# LANGUAGE CPP #-}
-
module Utility.SRV (
mkSRVTcp,
mkSRV,
@@ -42,12 +40,7 @@ lookupSRV :: SRV -> IO [HostPort]
lookupSRV (SRV srv) = do
seed <- makeResolvSeed defaultResolvConf
r <- withResolver seed $ flip DNS.lookupSRV $ B8.fromString srv
- return $
-#if MIN_VERSION_dns(1,0,0)
- either (const []) use r
-#else
- maybe [] use r
-#endif
+ return $ either (const []) use r
where
use = orderHosts . map tohosts
tohosts (priority, weight, port, hostname) =
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 1b68dce7f..2b71b6be4 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -67,11 +67,7 @@ data UrlOptions = UrlOptions
{ userAgent :: Maybe UserAgent
, reqHeaders :: Headers
, reqParams :: [CommandParam]
-#if MIN_VERSION_http_conduit(2,0,0)
, applyRequest :: Request -> Request
-#else
- , applyRequest :: forall m. Request m -> Request m
-#endif
}
instance Default UrlOptions
@@ -232,11 +228,7 @@ contentDispositionFilename s
drop 1 $ dropWhile (/= '"') s
| otherwise = Nothing
-#if MIN_VERSION_http_conduit(2,0,0)
headRequest :: Request -> Request
-#else
-headRequest :: Request m -> Request m
-#endif
headRequest r = r
{ method = methodHead
-- remove defaut Accept-Encoding header, to get actual,
diff --git a/git-annex.cabal b/git-annex.cabal
index c79ca7034..d6428cadc 100644
--- a/git-annex.cabal
+++ b/git-annex.cabal
@@ -342,7 +342,7 @@ Executable git-annex
resourcet,
http-client,
http-types,
- http-conduit,
+ http-conduit (>= 2.0.0),
time,
old-locale,
esqueleto,
@@ -395,7 +395,7 @@ Executable git-annex
CPP-Options: -DWITH_WEBDAV
if flag(Assistant) && ! os(solaris)
- Build-Depends: dns, mountpoints
+ Build-Depends: dns (>= 1.0.0), mountpoints
CPP-Options: -DWITH_ASSISTANT
if flag(Assistant)