Use newer resolver

Problem: latest available LTS resolver is 14.16 and `crossref-verifier`
doesn't compile with it.

Solution: update resolver to 14.16. Newer versions of some packages
are used from now on. I assume that it shouldn't break anything as
long as tests pass.
`req` stopped using `Default` class, that's the only change in the code
I had to make.
This commit is contained in:
Ivan Gromakovskii 2019-11-26 19:26:56 +03:00
parent 6e95538211
commit 2ebbbc1d63
No known key found for this signature in database
GPG Key ID: A70228CC0B057836
3 changed files with 11 additions and 19 deletions

View File

@ -69,15 +69,14 @@ dependencies:
- lens
- loot-prelude
- pretty-terminal
- network-uri
- mtl
- o-clock
- optparse-applicative
- req
- roman-numerals
- template-haskell
- text
- text-metrics
- template-haskell
- th-lift-instances
- th-utilities
- yaml

View File

@ -19,15 +19,14 @@ module Crv.Verify
import Control.Concurrent.Async (forConcurrently, withAsync)
import Control.Monad.Except (ExceptT, MonadError (..))
import Data.Default (def)
import qualified Data.Map as M
import qualified Data.Text as T
import Data.Text.Metrics (damerauLevenshteinNorm)
import Fmt (Buildable (..), blockListF', listF, (+|), (|+))
import qualified GHC.Exts as Exts
import Network.HTTP.Client (HttpException (..), HttpExceptionContent (..), responseStatus)
import Network.HTTP.Req (GET (..), HEAD (..), HttpException (..), NoReqBody (..), ignoreResponse,
parseUrl, req, runReq)
import Network.HTTP.Req (GET (..), HEAD (..), HttpException (..), NoReqBody (..), defaultHttpConfig,
ignoreResponse, parseUrl, req, runReq)
import Network.HTTP.Types.Status (Status, statusCode, statusMessage)
import System.Console.Pretty (Style (..), style)
import System.Directory (canonicalizePath, doesDirectoryExist, doesFileExist)
@ -256,9 +255,11 @@ checkExternalResource VerifyConfig{..} link
& maybe (throwError ExternalResourceInvalidUri) pure
let reqLink = case parsedUrl of
Left (url, option) ->
runReq def $ req method url NoReqBody ignoreResponse option
runReq defaultHttpConfig $
req method url NoReqBody ignoreResponse option
Right (url, option) ->
runReq def $ req method url NoReqBody ignoreResponse option
runReq defaultHttpConfig $
req method url NoReqBody ignoreResponse option
let maxTime = Time @Second $ unTime vcExternalRefCheckTimeout * timeoutFrac

View File

@ -1,23 +1,15 @@
resolver: lts-13.19
resolver: lts-14.16
packages:
- .
extra-deps:
- base-noprelude-4.12.0.0
- megaparsec-7.0.1
- parser-combinators-1.0.0
- cmark-0.5.6
- text-format-0.3.2
- fmt-0.6
- pretty-terminal-0.1.0.0
- roman-numerals-0.5.1.5
- req-1.2.1
- aeson-options-0.0.0
- aeson-1.3.1.1
- o-clock-1.0.0.1
- aeson-options-0.1.0
- o-clock-1.1.0
- git: https://github.com/serokell/lootbox.git
commit: 34e389808e34f1cfa56f456773682325bed56d17
commit: 4700376b8493f6ac164461715cb72a0259148ac2 # master
subdirs:
- code/prelude