Merge pull request #62 from haskell-servant/servant-0.16

Allow servant-0.16
This commit is contained in:
Oleg Grenrus 2019-02-28 00:05:15 +02:00 committed by GitHub
commit 638580ba49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 161 additions and 158 deletions

View File

@ -1,11 +1,11 @@
# This Travis job script has been generated by a script via # This Travis job script has been generated by a script via
# #
# runghc make_travis_yml_2.hs '--branch' 'master' '-o' '.travis.yml' 'servant-quickcheck.cabal' # haskell-ci '--branches' 'master' '-o' '.travis.yml' 'servant-quickcheck.cabal'
# #
# For more information, see https://github.com/haskell-CI/haskell-ci # For more information, see https://github.com/haskell-CI/haskell-ci
# #
language: c language: c
sudo: false dist: xenial
git: git:
submodules: false # whether to recursively clone submodules submodules: false # whether to recursively clone submodules
@ -20,68 +20,68 @@ cache:
- $HOME/.cabal/store - $HOME/.cabal/store
before_cache: before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
# remove files that are regenerated by 'cabal update' # remove files that are regenerated by 'cabal update'
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.* - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
- rm -rfv $HOME/.cabal/packages/head.hackage - rm -rfv $CABALHOME/packages/head.hackage
matrix: matrix:
include: include:
- compiler: "ghc-8.6.1" - compiler: "ghc-8.6.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.1], sources: [hvr-ghc]}}
- compiler: "ghc-8.4.4" - compiler: "ghc-8.4.4"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}} addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
- compiler: "ghc-8.2.2" - compiler: "ghc-8.2.2"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}} addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
- compiler: "ghc-8.0.2" - compiler: "ghc-8.0.2"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}} addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
- compiler: "ghc-7.10.3" - compiler: "ghc-7.10.3"
# env: TEST=--disable-tests BENCH=--disable-benchmarks
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}} addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
before_install: before_install:
- HC=${CC} - HC=/opt/ghc/bin/${CC}
- HCVER=$(echo "$TRAVIS_COMPILER" | sed 's/ghc-//')
- echo $HCVER
- HCPKG=${HC/ghc/ghc-pkg} - HCPKG=${HC/ghc/ghc-pkg}
- unset CC - unset CC
- CABAL=/opt/ghc/bin/cabal
- CABALHOME=$HOME/.cabal
- export PATH="$CABALHOME/bin:$PATH"
- ROOTDIR=$(pwd) - ROOTDIR=$(pwd)
- mkdir -p $HOME/.local/bin
- "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') )) - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
- echo $HCNUMVER - echo $HCNUMVER
install: install:
- cabal --version - ${CABAL} --version
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
- BENCH=${BENCH---enable-benchmarks} - TEST=--enable-tests
- TEST=${TEST---enable-tests} - BENCH=--enable-benchmarks
- HADDOCK=${HADDOCK-true}
- UNCONSTRAINED=${UNCONSTRAINED-true}
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
- GHCHEAD=${GHCHEAD-false} - GHCHEAD=${GHCHEAD-false}
- travis_retry cabal update -v - if [ "$TRAVIS_OS_NAME" = "windows" ]; then export CABALHOME=$APPDATA/cabal; else export CABALHOME=$HOME/.cabal; fi
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config" - travis_retry ${CABAL} update -v
- sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
- rm -fv cabal.project cabal.project.local - rm -fv cabal.project cabal.project.local
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$' - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
- "printf 'packages: \".\"\\n' > cabal.project" - rm -f cabal.project
- touch cabal.project
- "printf 'packages: \".\"\\n' >> cabal.project"
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
- touch cabal.project.local - touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant-quickcheck | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi" - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(servant-quickcheck)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true - cat cabal.project || true
- cat cabal.project.local || true - cat cabal.project.local || true
- if [ -f "./configure.ac" ]; then - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
(cd "." && autoreconf -i);
fi
- rm -f cabal.project.freeze - rm -f cabal.project.freeze
- cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all - ${CABAL} new-freeze -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dry
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all - "cat \"cabal.project.freeze\" | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
- rm "cabal.project.freeze"
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
- rm -rf .ghc.environment.* "."/dist - rm -rf .ghc.environment.* "."/dist
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX) - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
@ -89,30 +89,33 @@ install:
# any command which exits with a non-zero exit code causes the build to fail. # any command which exits with a non-zero exit code causes the build to fail.
script: script:
# test that source-distributions can be generated # test that source-distributions can be generated
- cabal new-sdist all - ${CABAL} new-sdist all
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/ - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
- cd ${DISTDIR} || false - cd ${DISTDIR} || false
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \; - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- "printf 'packages: servant-quickcheck-*/*.cabal\\n' > cabal.project" - rm -f cabal.project
- touch cabal.project
- "printf 'packages: \"servant-quickcheck-*/*.cabal\"\\n' >> cabal.project"
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
- touch cabal.project.local - touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant-quickcheck | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi" - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(servant-quickcheck)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
- cat cabal.project || true - cat cabal.project || true
- cat cabal.project.local || true - cat cabal.project.local || true
# this builds all libraries and executables (without tests/benchmarks) # this builds all libraries and executables (without tests/benchmarks)
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all - ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all
# build & run tests, build benchmarks # build & run tests, build benchmarks
- cabal new-build -w ${HC} ${TEST} ${BENCH} all - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi - if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC} ${TEST} ${BENCH} all; fi
# cabal check # cabal check
- (cd servant-quickcheck-* && cabal check) - (cd servant-quickcheck-* && ${CABAL} check)
# haddock # haddock
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi - ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
# Build without installed constraints for packages in global-db # Build without installed constraints for packages in global-db
- if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi - rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all;
# REGENDATA ["--branch","master","-o",".travis.yml","servant-quickcheck.cabal"] # REGENDATA ["--branches","master","-o",".travis.yml","servant-quickcheck.cabal"]
# EOF # EOF

View File

@ -1,29 +1,22 @@
name: servant-quickcheck name: servant-quickcheck
version: 0.0.7.3 version: 0.0.7.3
synopsis: QuickCheck entire APIs synopsis: QuickCheck entire APIs
description: description:
This packages provides QuickCheck properties that are tested across an entire This packages provides QuickCheck properties that are tested across an entire
API. API.
license: BSD3
license-file: LICENSE
author: Julian K. Arni
maintainer: jkarni@gmail.com
category: Web
build-type: Simple
cabal-version: >=1.10
extra-source-files:
CHANGELOG.yaml
tested-with:
GHC ==7.10.3
|| ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.1
license: BSD3
license-file: LICENSE
author: Julian K. Arni
maintainer: jkarni@gmail.com
category: Web
build-type: Simple
cabal-version: >=1.10
extra-source-files: CHANGELOG.yaml
tested-with: GHC ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.3
source-repository head source-repository head
type: git type: git
location: https://github.com/haskell-servant/servant-quickcheck location: https://github.com/haskell-servant/servant-quickcheck
flag long-tests flag long-tests
@ -31,108 +24,115 @@ flag long-tests
default: False default: False
library library
exposed-modules: Servant.QuickCheck exposed-modules:
, Servant.QuickCheck.Internal Servant.QuickCheck
, Servant.QuickCheck.Internal.Predicates Servant.QuickCheck.Internal
, Servant.QuickCheck.Internal.HasGenRequest Servant.QuickCheck.Internal.Equality
, Servant.QuickCheck.Internal.QuickCheck Servant.QuickCheck.Internal.ErrorTypes
, Servant.QuickCheck.Internal.Equality Servant.QuickCheck.Internal.HasGenRequest
, Servant.QuickCheck.Internal.ErrorTypes Servant.QuickCheck.Internal.Predicates
build-depends: base >=4.8 && <4.13 Servant.QuickCheck.Internal.QuickCheck
, base-compat-batteries >= 0.10.1 && <0.11
, aeson > 0.8 && < 2
, bytestring == 0.10.*
, case-insensitive == 1.2.*
, clock >= 0.7 && < 0.8
, data-default-class >= 0.0 && < 0.2
, hspec >= 2.5.6 && < 2.6
, http-client >= 0.4.30 && < 0.6 build-depends:
, http-media >= 0.6 && <0.8 aeson >=0.8 && <2
, http-types > 0.8 && < 0.13 , base >=4.8 && <4.13
, mtl > 2.1 && < 2.3 , base-compat-batteries >=0.10.1 && <0.11
, pretty == 1.1.* , bytestring >=0.10 && <0.11
, process >= 1.2 && < 1.7 , case-insensitive >=1.2 && <1.3
, QuickCheck > 2.7 && < 2.13 , clock >=0.7 && <0.8
, servant >= 0.13 && < 0.15 , data-default-class >=0.0 && <0.2
, servant-client >= 0.13 && < 0.15 , hspec >=2.5.6 && <2.8
, servant-server >= 0.13 && < 0.15 , http-client >=0.4.30 && <0.7
, split == 0.2.* , http-media >=0.6 && <0.8
, string-conversions > 0.3 && < 0.5 , http-types >=0.8 && <0.13
, temporary >= 1.2 && <1.4 , mtl >=2.1 && <2.3
, text == 1.* , pretty >=1.1 && <1.2
, time >= 1.5 && < 1.9 , process >=1.2 && <1.7
, warp >= 3.2.4 && < 3.3 , QuickCheck >=2.7 && <2.13
, servant >=0.13 && <0.15
, servant-client >=0.13 && <0.15
, servant-server >=0.13 && <0.15
, split >=0.2 && <0.3
, string-conversions >=0.3 && <0.5
, temporary >=1.2 && <1.4
, text >=1 && <2
, time >=1.5 && <1.9
, warp >=3.2.4 && <3.3
if !impl(ghc >= 8.0) if !impl(ghc >=8.0)
build-depends: build-depends: semigroups >=0.18.3 && <0.19
semigroups >= 0.18.3 && <0.19
hs-source-dirs: src hs-source-dirs: src
default-extensions: TypeOperators default-extensions:
, FlexibleInstances NoImplicitPrelude
, FlexibleContexts ConstraintKinds
, DataKinds DataKinds
, GADTs DeriveDataTypeable
, MultiParamTypeClasses DeriveFunctor
, DeriveFunctor DeriveGeneric
, KindSignatures FlexibleContexts
, RankNTypes FlexibleInstances
, ConstraintKinds FunctionalDependencies
, DeriveGeneric GADTs
, ScopedTypeVariables KindSignatures
, OverloadedStrings MultiParamTypeClasses
, FunctionalDependencies OverloadedStrings
, NoImplicitPrelude RankNTypes
, DeriveDataTypeable ScopedTypeVariables
default-language: Haskell2010 TypeOperators
default-language: Haskell2010
test-suite spec test-suite spec
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
ghc-options: -Wall -threaded ghc-options: -Wall -threaded
default-language: Haskell2010 default-language: Haskell2010
hs-source-dirs: test hs-source-dirs: test
main-is: Spec.hs main-is: Spec.hs
other-modules: Servant.QuickCheck.InternalSpec other-modules: Servant.QuickCheck.InternalSpec
build-tool-depends: hspec-discover:hspec-discover build-tool-depends: hspec-discover:hspec-discover -any
build-depends: base build-depends:
, base-compat-batteries aeson
, aeson , base
, servant-quickcheck , base-compat-batteries
, bytestring , blaze-html
, hspec , bytestring
, hspec-core >= 2.5.5 && < 2.6 , hspec
, http-client , hspec-core >=2.5.5 && <2.8
, blaze-html , http-client
, warp , QuickCheck
, servant-server , quickcheck-io
, servant-client , servant
, servant , servant-blaze
, servant-blaze , servant-client
, transformers , servant-quickcheck
, QuickCheck , servant-server
, quickcheck-io , transformers
default-extensions: TypeOperators , warp
, FlexibleInstances
, FlexibleContexts default-extensions:
, GADTs NoImplicitPrelude
, DataKinds DataKinds
, NoImplicitPrelude FlexibleContexts
, OverloadedStrings FlexibleInstances
, ScopedTypeVariables GADTs
OverloadedStrings
ScopedTypeVariables
TypeOperators
if flag(long-tests) if flag(long-tests)
cpp-options: -DLONG_TESTS cpp-options: -DLONG_TESTS
test-suite example test-suite example
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: Main.hs main-is: Main.hs
hs-source-dirs: hs-source-dirs: example
example ghc-options: -Wall
ghc-options: -Wall
build-depends: build-depends:
base base
, hspec , hspec
, servant-server
, servant-quickcheck , servant-quickcheck
, servant-server
, text , text
default-language: Haskell2010 default-language: Haskell2010