From 21205ac54afb5b309ea49b7d26987380df365302 Mon Sep 17 00:00:00 2001 From: Samuel Schlesinger Date: Sun, 18 Oct 2020 14:44:08 -0400 Subject: [PATCH] Made work with servant-0.18 --- .travis.yml | 37 +++++++++++++++++-------------------- cabal.haskell-ci | 4 ++++ servant-ekg.cabal | 10 +++++----- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index d7f973b..5a40b53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,14 @@ # This Travis job script has been generated by a script via # -# haskell-ci '--output=.travis.yml' '--config=cabal.haskell-ci' 'cabal.project' +# haskell-ci 'servant-ekg.cabal' +# +# To regenerate the script (for example after adjusting tested-with) run +# +# haskell-ci regenerate # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.9.20200121 +# version: 0.10.2 # version: ~> 1.0 language: c @@ -13,9 +17,6 @@ dist: xenial git: # whether to recursively clone submodules submodules: false -branches: - only: - - master cache: directories: - $HOME/.cabal/packages @@ -33,16 +34,16 @@ before_cache: jobs: include: - compiler: ghc-8.6.5 - addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0"]}} + addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}} os: linux - compiler: ghc-8.4.4 - addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.0"]}} + addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}} os: linux - compiler: ghc-8.2.2 - addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.0"]}} + addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}} os: linux - compiler: ghc-8.0.2 - addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.0"]}} + addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}} os: linux before_install: - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//') @@ -92,6 +93,8 @@ install: - touch cabal.project - | echo "packages: ." >> cabal.project + - if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-ekg' >> cabal.project ; fi + - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi" - | - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-ekg)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true @@ -100,8 +103,8 @@ install: - ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'" - rm cabal.project.freeze - - ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all - - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all + - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all + - travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all script: - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX) # Packaging... @@ -117,6 +120,8 @@ script: - touch cabal.project - | echo "packages: ${PKGDIR_servant_ekg}" >> cabal.project + - if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-ekg' >> cabal.project ; fi + - "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi" - | - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-ekg)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true @@ -136,14 +141,6 @@ script: # Building without installed constraints for packages in global-db... - rm -f cabal.project.local - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all - # Constraint sets - - rm -rf cabal.project.local - # Constraint set servant-0.15 - - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.15.*' all - # Constraint set servant-0.16 - - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all - # Constraint set servant-0.17 - - ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all -# REGENDATA ("0.9.20200121",["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"]) +# REGENDATA ("0.10.2",["servant-ekg.cabal"]) # EOF diff --git a/cabal.haskell-ci b/cabal.haskell-ci index f505a83..cd9afef 100644 --- a/cabal.haskell-ci +++ b/cabal.haskell-ci @@ -11,3 +11,7 @@ constraint-set servant-0.16 constraint-set servant-0.17 ghc: >= 8.0 && <8.10 constraints: servant ==0.17.* + +constraint-set servant-0.18 + ghc: >= 8.0 && <9.0 + constraints: servant ==0.18.* diff --git a/servant-ekg.cabal b/servant-ekg.cabal index fcebe2d..44c18ef 100644 --- a/servant-ekg.cabal +++ b/servant-ekg.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant-ekg -version: 0.3.1 +version: 0.3.2 synopsis: Helpers for using ekg with servant description: Helpers for using ekg with servant, e.g.. counters per endpoint. license: BSD3 @@ -13,7 +13,7 @@ maintainer: category: Servant, Web, System build-type: Simple -tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 +tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.2 extra-source-files: README.md CHANGELOG.md source-repository HEAD @@ -25,13 +25,13 @@ library other-modules: Servant.Ekg.Internal hs-source-dirs: lib build-depends: - base >=4.9 && <4.13 + base >=4.9 && <4.15 , ekg-core >=0.1.1.4 && <0.2 , http-types >=0.12.2 && <0.13 , hashable >=1.2.7.0 && <1.4 - , servant >=0.14 && <0.18 + , servant >=0.14 && <0.19 , text >=1.2.3.0 && <1.3 - , time >=1.6.0.1 && <1.9 + , time >=1.6.0.1 && <1.12 , unordered-containers >=0.2.9.0 && <0.3 , wai >=3.2.0 && <3.3