Skip to content

Commit eb4cbc2

Browse files
authored
Merge pull request #41 from haskell-servant/servant-0.17
Support servant-0.17
2 parents 2f5b496 + 44150fd commit eb4cbc2

File tree

4 files changed

+41
-46
lines changed

4 files changed

+41
-46
lines changed

.travis.yml

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
#
55
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
7-
# version: 0.5.20190908
7+
# version: 0.9.20200121
88
#
9+
version: ~> 1.0
910
language: c
11+
os: linux
1012
dist: xenial
1113
git:
1214
# whether to recursively clone submodules
@@ -18,6 +20,7 @@ cache:
1820
directories:
1921
- $HOME/.cabal/packages
2022
- $HOME/.cabal/store
23+
- $HOME/.hlint
2124
before_cache:
2225
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
2326
# remove files that are regenerated by 'cabal update'
@@ -27,18 +30,23 @@ before_cache:
2730
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
2831
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
2932
- rm -rfv $CABALHOME/packages/head.hackage
30-
matrix:
33+
jobs:
3134
include:
3235
- compiler: ghc-8.8.1
33-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
36+
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.8.1","cabal-install-3.0"]}}
37+
os: linux
3438
- compiler: ghc-8.6.5
35-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
39+
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"]}}
40+
os: linux
3641
- compiler: ghc-8.4.4
37-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
42+
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"]}}
43+
os: linux
3844
- compiler: ghc-8.2.2
39-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
45+
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"]}}
46+
os: linux
4047
- compiler: ghc-8.0.2
41-
addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
48+
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"]}}
49+
os: linux
4250
before_install:
4351
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
4452
- WITHCOMPILER="-w $HC"
@@ -51,29 +59,8 @@ before_install:
5159
- TOP=$(pwd)
5260
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
5361
- echo $HCNUMVER
54-
- CABAL="$CABAL -vnormal+nowrap+markoutput"
62+
- CABAL="$CABAL -vnormal+nowrap"
5563
- set -o pipefail
56-
- |
57-
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
58-
echo 'BEGIN { state = "output"; }' >> .colorful.awk
59-
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
60-
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
61-
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
62-
echo ' if (state == "cabal") {' >> .colorful.awk
63-
echo ' print blue($0)' >> .colorful.awk
64-
echo ' } else {' >> .colorful.awk
65-
echo ' print $0' >> .colorful.awk
66-
echo ' }' >> .colorful.awk
67-
echo '}' >> .colorful.awk
68-
- cat .colorful.awk
69-
- |
70-
color_cabal_output () {
71-
awk -f $TOP/.colorful.awk
72-
}
73-
- echo text | color_cabal_output
74-
install:
75-
- ${CABAL} --version
76-
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
7764
- TEST=--enable-tests
7865
- if [ $HCNUMVER -ge 80800 ] ; then TEST=--disable-tests ; fi
7966
- BENCH=--enable-benchmarks
@@ -95,6 +82,9 @@ install:
9582
echo " prefix: $CABALHOME" >> $CABALHOME/config
9683
echo "repository hackage.haskell.org" >> $CABALHOME/config
9784
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
85+
install:
86+
- ${CABAL} --version
87+
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
9888
- |
9989
echo "program-default-options" >> $CABALHOME/config
10090
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
@@ -111,15 +101,15 @@ install:
111101
- cat cabal.project || true
112102
- cat cabal.project.local || true
113103
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
114-
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
104+
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
115105
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
116106
- rm cabal.project.freeze
117-
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all | color_cabal_output
118-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all | color_cabal_output
107+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
108+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
119109
script:
120110
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
121111
# Packaging...
122-
- ${CABAL} v2-sdist all | color_cabal_output
112+
- ${CABAL} v2-sdist all
123113
# Unpacking...
124114
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
125115
- cd ${DISTDIR} || false
@@ -137,25 +127,27 @@ script:
137127
- cat cabal.project.local || true
138128
# Building...
139129
# this builds all libraries and executables (without tests/benchmarks)
140-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
130+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
141131
# Building with tests and benchmarks...
142132
# build & run tests, build benchmarks
143-
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
133+
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all
144134
# Testing...
145-
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
135+
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all ; fi
146136
# cabal check...
147137
- (cd ${PKGDIR_servant_js} && ${CABAL} -vnormal check)
148138
# haddock...
149-
- ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output
139+
- ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all
150140
# Building without installed constraints for packages in global-db...
151141
- rm -f cabal.project.local
152-
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all | color_cabal_output
142+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks all
153143
# Constraint sets
154144
- rm -rf cabal.project.local
155145
# Constraint set servant-0.15
156-
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.15.*' all | color_cabal_output ; fi
146+
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.15.*' all ; fi
157147
# Constraint set servant-0.16
158-
- if [ $HCNUMVER -lt 80800 ] ; then ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all | color_cabal_output ; fi
148+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.16.*' all
149+
# Constraint set servant-0.17
150+
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='servant ==0.17.*' all
159151

160-
# REGENDATA ["--output",".travis.yml","--config=cabal.haskell-ci","servant-js.cabal"]
152+
# REGENDATA ("0.9.20200121",["--output",".travis.yml","--config=cabal.haskell-ci","servant-js.cabal"])
161153
# EOF

cabal.haskell-ci

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ constraint-set servant-0.15
88
constraints: servant ==0.15.*
99

1010
constraint-set servant-0.16
11-
ghc: >= 8.0 && <8.8
11+
ghc: >= 8.0 && <8.10
1212
constraints: servant ==0.16.*
13+
14+
constraint-set servant-0.17
15+
ghc: >= 8.0 && <8.10
16+
constraints: servant ==0.17.*

servant-js.cabal

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: servant-js
2-
version: 0.9.4
3-
x-revision: 2
2+
version: 0.9.4.1
43

54
synopsis: Automatically derive javascript functions to query servant webservices.
65
category: Web, Servant
@@ -56,7 +55,7 @@ library
5655
, charset >= 0.3.7.1 && <0.4
5756
, lens >= 4.17 && <4.19
5857
, servant-foreign >= 0.15 && <0.16
59-
, servant >= 0.15 && <0.17
58+
, servant >= 0.15 && <0.18
6059
, text >= 1.2.3.0 && < 1.3
6160

6261
hs-source-dirs: src

test/Servant/JSSpec.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Test.QuickCheck (Arbitrary (..),
2828
choose, listOf,
2929
property)
3030

31-
import Servant.API.Internal.Test.ComprehensiveAPI
31+
import Servant.Test.ComprehensiveAPI
3232
import Servant.API.ContentTypes
3333
import Servant.API.QueryParam
3434
import Servant.JS

0 commit comments

Comments
 (0)