on master help sign in
Test with GHC 9.0.1 and 8.10.4
commitd97a6346bef6730a3a512edf8024e0f00f2ffdb4 authorMark Karpov <markkarpov92@gmail.com> dateTue 2 Mar 2021, 22:09 (6 years ago) parent727a711
5 files changed+17−29
.github/workflows/ci.yaml+4−4 Network/HTTP/Req.hs+4−2 httpbin-tests/Network/HTTP/ReqSpec.hs−5 pure-tests/Network/HTTP/ReqSpec.hs−9 req.cabal+9−9
.github/workflows/ci.yaml+4−4
@@ -12,19 +12,19 @@ jobs:
1212 runs-on: ubuntu-latest
1313 steps:
1414 - uses: actions/checkout@v2.3.4
15− - uses: mrkkrp/ormolu-action@v1
15+ - uses: mrkkrp/ormolu-action@v2
1616 build:
1717 runs-on: ubuntu-latest
1818 needs: ormolu
1919 strategy:
2020 matrix:
21− cabal: ["3.2"]
22− ghc: ["8.6.5", "8.8.4", "8.10.3"]
21+ cabal: ["3.4"]
22+ ghc: ["8.8.4", "8.10.4", "9.0.1"]
2323 env:
2424 CONFIG: "--enable-tests --enable-benchmarks --flags=dev"
2525 steps:
2626 - uses: actions/checkout@v2.3.4
27− - uses: haskell/actions/setup@v1.1.5
27+ - uses: haskell/actions/setup@v1.2
2828 id: setup-haskell-cabal
2929 with:
3030 ghc-version: ${{ matrix.ghc }}
Network/HTTP/Req.hs+4−2
@@ -953,8 +953,10 @@ instance Typeable scheme => TH.Lift (Url scheme) where
953953 where
954954 liftText t = TH.AppE (TH.VarE 'T.pack) <$> TH.lift (T.unpack t)
955955
956−#if MIN_VERSION_template_haskell(2,16,0)
957− liftTyped url = TH.TExp <$> TH.lift url
956+#if MIN_VERSION_template_haskell(2,17,0)
957+ liftTyped = TH.Code . TH.unsafeTExpCoerce . TH.lift
958+#elif MIN_VERSION_template_haskell(2,16,0)
959+ liftTyped = TH.unsafeTExpCoerce . TH.lift
958960#endif
959961
960962-- | Given host name, produce a 'Url' which has “http” as its scheme and
httpbin-tests/Network/HTTP/ReqSpec.hs−5
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE DataKinds #-}
32{-# LANGUAGE FlexibleInstances #-}
43{-# LANGUAGE OverloadedStrings #-}
@@ -27,10 +26,6 @@ import qualified Network.HTTP.Types as Y
2726import Test.Hspec
2827import Test.QuickCheck
2928
30−#if !MIN_VERSION_base(4,13,0)
31−import Data.Semigroup ((<>))
32−#endif
33−
3429spec :: Spec
3530spec = do
3631 describe "exception throwing on non-2xx status codes" $
pure-tests/Network/HTTP/ReqSpec.hs−9
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE DataKinds #-}
32{-# LANGUAGE DeriveGeneric #-}
43{-# LANGUAGE FlexibleInstances #-}
@@ -48,10 +47,6 @@ import Text.URI (URI)
4847import qualified Text.URI as URI
4948import qualified Text.URI.QQ as QQ
5049
51−#if !MIN_VERSION_base(4,13,0)
52−import Data.Semigroup ((<>))
53−#endif
54−
5550spec :: Spec
5651spec = do
5752 describe "config" $
@@ -266,11 +261,7 @@ spec = do
266261 it "cookie jar is set without modifications" $
267262 property $ \cjar -> do
268263 request <- req_ GET url NoReqBody (cookieJar cjar)
269−#if MIN_VERSION_http_client(0,7,0)
270264 L.cookieJar request `shouldSatisfy` (maybe False (L.equalCookieJar cjar))
271−#else
272− L.cookieJar request `shouldBe` Just cjar
273−#endif
274265 describe "basicAuth" $ do
275266 it "sets Authorization header to correct value" $
276267 property $ \username password -> do
req.cabal+9−9
@@ -5,7 +5,7 @@ license: BSD3
55license-file: LICENSE.md
66maintainer: Mark Karpov <markkarpov92@gmail.com>
77author: Mark Karpov <markkarpov92@gmail.com>
8−tested-with: ghc ==8.6.5 ghc ==8.8.4 ghc ==8.10.3
8+tested-with: ghc ==8.8.4 ghc ==8.10.4 ghc ==9.0.1
99homepage: https://github.com/mrkkrp/req
1010bug-reports: https://github.com/mrkkrp/req/issues
1111synopsis: HTTP client library
@@ -35,21 +35,21 @@ library
3535 build-depends:
3636 aeson >=0.9 && <1.6,
3737 authenticate-oauth >=1.5 && <1.7,
38− base >=4.12 && <5.0,
38+ base >=4.13 && <5.0,
3939 blaze-builder >=0.3 && <0.5,
4040 bytestring >=0.10.8 && <0.12,
4141 case-insensitive >=0.2 && <1.3,
4242 connection >=0.2.2 && <0.4,
4343 exceptions >=0.6 && <0.11,
4444 http-api-data >=0.2 && <0.5,
45− http-client >=0.5 && <0.8,
45+ http-client >=0.7 && <0.8,
4646 http-client-tls >=0.3.2 && <0.4,
4747 http-types >=0.8 && <10.0,
4848 modern-uri >=0.3 && <0.4,
4949 monad-control >=1.0 && <1.1,
5050 mtl >=2.0 && <3.0,
5151 retry >=0.8 && <0.9,
52− template-haskell >=2.14 && <2.17,
52+ template-haskell >=2.14 && <2.18,
5353 text >=0.2 && <1.3,
5454 time >=1.2 && <1.10,
5555 transformers >=0.4 && <0.6,
@@ -77,19 +77,19 @@ test-suite pure-tests
7777 build-depends:
7878 QuickCheck >=2.7 && <3.0,
7979 aeson >=0.9 && <1.6,
80− base >=4.12 && <5.0,
80+ base >=4.13 && <5.0,
8181 blaze-builder >=0.3 && <0.5,
8282 bytestring >=0.10.8 && <0.12,
8383 case-insensitive >=0.2 && <1.3,
8484 hspec >=2.0 && <3.0,
8585 hspec-core >=2.0 && <3.0,
86− http-client >=0.5 && <0.8,
86+ http-client >=0.7 && <0.8,
8787 http-types >=0.8 && <10.0,
8888 modern-uri >=0.3 && <0.4,
8989 mtl >=2.0 && <3.0,
9090 req,
9191 retry >=0.8 && <0.9,
92− template-haskell >=2.14 && <2.17,
92+ template-haskell >=2.14 && <2.18,
9393 text >=0.2 && <1.3,
9494 time >=1.2 && <1.10
9595
@@ -109,10 +109,10 @@ test-suite httpbin-tests
109109 build-depends:
110110 QuickCheck >=2.7 && <3.0,
111111 aeson >=0.9 && <1.6,
112− base >=4.12 && <5.0,
112+ base >=4.13 && <5.0,
113113 bytestring >=0.10.8 && <0.12,
114114 hspec >=2.0 && <3.0,
115− http-client >=0.5 && <0.8,
115+ http-client >=0.7 && <0.8,
116116 http-types >=0.8 && <10.0,
117117 monad-control >=1.0 && <1.1,
118118 mtl >=2.0 && <3.0,