Skip to content

Commit 64cb1f3

Browse files
authored
Merge pull request #964 from phadej/ghc-8.4.2
Support GHC-8.4.1 and newer deps
2 parents 3e8c217 + e874beb commit 64cb1f3

File tree

23 files changed

+125
-78
lines changed

23 files changed

+125
-78
lines changed

.travis.yml

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# runghc make_travis_yml_2.hs '--config=cabal.make-travis-yml' '--output=.travis.yml' '--max-backjumps=10000' 'cabal.project'
3+
# runghc make_travis_yml_2.hs '--config=cabal.make-travis-yml' '--output=.travis.yml' 'cabal.project'
44
#
55
# For more information, see https://github.com/hvr/multi-ghc-travis
66
#
@@ -33,18 +33,21 @@ before_cache:
3333

3434
matrix:
3535
include:
36-
- compiler: "ghc-7.8.4"
36+
- compiler: "ghc-8.4.2"
3737
# env: TEST=--disable-tests BENCH=--disable-benchmarks
38-
addons: {apt: {packages: [ghc-ppa-tools,ghc-7.8.4,xz-utils], sources: [hvr-ghc]}}
39-
- compiler: "ghc-7.10.3"
38+
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.4.2], sources: [hvr-ghc]}}
39+
- compiler: "ghc-8.2.2"
4040
# env: TEST=--disable-tests BENCH=--disable-benchmarks
41-
addons: {apt: {packages: [ghc-ppa-tools,ghc-7.10.3,xz-utils], sources: [hvr-ghc]}}
41+
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.2.2], sources: [hvr-ghc]}}
4242
- compiler: "ghc-8.0.2"
4343
# env: TEST=--disable-tests BENCH=--disable-benchmarks
44-
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.0.2,xz-utils], sources: [hvr-ghc]}}
45-
- compiler: "ghc-8.2.2"
44+
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.0.2], sources: [hvr-ghc]}}
45+
- compiler: "ghc-7.10.3"
46+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
47+
addons: {apt: {packages: [ghc-ppa-tools,ghc-7.10.3], sources: [hvr-ghc]}}
48+
- compiler: "ghc-7.8.4"
4649
# env: TEST=--disable-tests BENCH=--disable-benchmarks
47-
addons: {apt: {packages: [ghc-ppa-tools,ghc-8.2.2,xz-utils], sources: [hvr-ghc]}}
50+
addons: {apt: {packages: [ghc-ppa-tools,ghc-7.8.4], sources: [hvr-ghc]}}
4851

4952
before_install:
5053
- HC=${CC}
@@ -75,15 +78,14 @@ install:
7578
- HADDOCK=${HADDOCK-true}
7679
- INSTALLED=${INSTALLED-true}
7780
- GHCHEAD=${GHCHEAD-false}
78-
- CABALNEWBUILDOPTS=--max-backjumps=10000
7981
- travis_retry cabal update -v
8082
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
8183
- rm -fv cabal.project cabal.project.local
8284
- "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
8385
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
84-
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/jwt-and-basic-auth\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/basic-auth\" \"doc/cookbook/https\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\" \"doc/cookbook/file-upload\"\\n' > cabal.project"
86+
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/basic-auth\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/file-upload\" \"doc/cookbook/https\" \"doc/cookbook/pagination\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\"\\n' > cabal.project"
8587
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
86-
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server' >> cabal.project"
88+
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server, http-media:base' >> cabal.project"
8789
- cat cabal.project
8890
- if [ -f "servant/configure.ac" ]; then
8991
(cd "servant" && autoreconf -i);
@@ -106,32 +108,32 @@ install:
106108
- if [ -f "doc/tutorial/configure.ac" ]; then
107109
(cd "doc/tutorial" && autoreconf -i);
108110
fi
111+
- if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then
112+
(cd "doc/cookbook/basic-auth" && autoreconf -i);
113+
fi
109114
- if [ -f "doc/cookbook/db-postgres-pool/configure.ac" ]; then
110115
(cd "doc/cookbook/db-postgres-pool" && autoreconf -i);
111116
fi
112-
- if [ -f "doc/cookbook/jwt-and-basic-auth/configure.ac" ]; then
113-
(cd "doc/cookbook/jwt-and-basic-auth" && autoreconf -i);
114-
fi
115117
- if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then
116118
(cd "doc/cookbook/db-sqlite-simple" && autoreconf -i);
117119
fi
118-
- if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then
119-
(cd "doc/cookbook/basic-auth" && autoreconf -i);
120+
- if [ -f "doc/cookbook/file-upload/configure.ac" ]; then
121+
(cd "doc/cookbook/file-upload" && autoreconf -i);
120122
fi
121123
- if [ -f "doc/cookbook/https/configure.ac" ]; then
122124
(cd "doc/cookbook/https" && autoreconf -i);
123125
fi
126+
- if [ -f "doc/cookbook/pagination/configure.ac" ]; then
127+
(cd "doc/cookbook/pagination" && autoreconf -i);
128+
fi
124129
- if [ -f "doc/cookbook/structuring-apis/configure.ac" ]; then
125130
(cd "doc/cookbook/structuring-apis" && autoreconf -i);
126131
fi
127132
- if [ -f "doc/cookbook/using-custom-monad/configure.ac" ]; then
128133
(cd "doc/cookbook/using-custom-monad" && autoreconf -i);
129134
fi
130-
- if [ -f "doc/cookbook/file-upload/configure.ac" ]; then
131-
(cd "doc/cookbook/file-upload" && autoreconf -i);
132-
fi
133135
- rm -f cabal.project.freeze
134-
- rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/jwt-and-basic-auth"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/https"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/file-upload"/dist
136+
- rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/file-upload"/dist "doc/cookbook/https"/dist "doc/cookbook/pagination"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist
135137
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
136138

137139
# Here starts the actual work to be performed for the package under test;
@@ -146,38 +148,37 @@ script:
146148
- (cd "servant-foreign" && cabal sdist)
147149
- (cd "servant-server" && cabal sdist)
148150
- (cd "doc/tutorial" && cabal sdist)
151+
- (cd "doc/cookbook/basic-auth" && cabal sdist)
149152
- (cd "doc/cookbook/db-postgres-pool" && cabal sdist)
150-
- (cd "doc/cookbook/jwt-and-basic-auth" && cabal sdist)
151153
- (cd "doc/cookbook/db-sqlite-simple" && cabal sdist)
152-
- (cd "doc/cookbook/basic-auth" && cabal sdist)
154+
- (cd "doc/cookbook/file-upload" && cabal sdist)
153155
- (cd "doc/cookbook/https" && cabal sdist)
156+
- (cd "doc/cookbook/pagination" && cabal sdist)
154157
- (cd "doc/cookbook/structuring-apis" && cabal sdist)
155158
- (cd "doc/cookbook/using-custom-monad" && cabal sdist)
156-
- (cd "doc/cookbook/file-upload" && cabal sdist)
157159
- echo -en 'travis_fold:end:sdist\\r'
158160
- echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
159-
- mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/jwt-and-basic-auth"/dist/cookbook-jwt-and-basic-auth-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz "doc/cookbook/file-upload"/dist/cookbook-file-upload-*.tar.gz ${DISTDIR}/
161+
- mv "servant"/dist/servant-*.tar.gz "servant-client"/dist/servant-client-*.tar.gz "servant-client-core"/dist/servant-client-core-*.tar.gz "servant-docs"/dist/servant-docs-*.tar.gz "servant-foreign"/dist/servant-foreign-*.tar.gz "servant-server"/dist/servant-server-*.tar.gz "doc/tutorial"/dist/tutorial-*.tar.gz "doc/cookbook/basic-auth"/dist/cookbook-basic-auth-*.tar.gz "doc/cookbook/db-postgres-pool"/dist/cookbook-db-postgres-pool-*.tar.gz "doc/cookbook/db-sqlite-simple"/dist/cookbook-db-sqlite-simple-*.tar.gz "doc/cookbook/file-upload"/dist/cookbook-file-upload-*.tar.gz "doc/cookbook/https"/dist/cookbook-https-*.tar.gz "doc/cookbook/pagination"/dist/cookbook-pagination-*.tar.gz "doc/cookbook/structuring-apis"/dist/cookbook-structuring-apis-*.tar.gz "doc/cookbook/using-custom-monad"/dist/cookbook-using-custom-monad-*.tar.gz ${DISTDIR}/
160162
- cd ${DISTDIR} || false
161163
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
162-
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-jwt-and-basic-auth-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-https-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal cookbook-file-upload-*/*.cabal\\n' > cabal.project"
164+
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-file-upload-*/*.cabal cookbook-https-*/*.cabal cookbook-pagination-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal\\n' > cabal.project"
163165
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
164-
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server' >> cabal.project"
166+
- "echo 'allow-newer: servant-js:servant,servant-js:servant-foreign,servant-auth-server:http-types,servant-multipart:lens,servant-multipart:resourcet,servant-multipart:servant,servant-multipart:servant-server,servant-auth-server:servant-server, http-media:base' >> cabal.project"
165167
- cat cabal.project
166168
- echo -en 'travis_fold:end:unpack\\r'
167169

168170

169171
- echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
170172
# build & run tests, build benchmarks
171-
- cabal new-build -w ${HC} ${TEST} ${BENCH} ${CABALNEWBUILDOPTS} all
173+
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
172174
- echo -en 'travis_fold:end:build-everything\\r'
173-
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} ${CABALNEWBUILDOPTS} all; fi
175+
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
174176

175-
# - echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
176-
# # haddock
177-
# - rm -rf ./dist-newstyle
178-
# - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} ${CABALNEWBUILDOPTS} all; else echo "Skipping haddock generation";fi
179-
#
180-
# - echo -en 'travis_fold:end:haddock\\r'
177+
- echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
178+
# haddock
179+
- rm -rf ./dist-newstyle
180+
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
181181

182-
# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","--max-backjumps=10000","cabal.project"]
182+
- echo -en 'travis_fold:end:haddock\\r'
183+
# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]
183184
# EOF

cabal.project

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,27 @@ packages: servant/
55
servant-foreign/
66
servant-server/
77
doc/tutorial/
8-
doc/cookbook/*/*.cabal
8+
9+
-- doc/cookbook/*/*.cabal
10+
11+
doc/cookbook/basic-auth
12+
doc/cookbook/db-postgres-pool
13+
doc/cookbook/db-sqlite-simple
14+
doc/cookbook/file-upload
15+
doc/cookbook/https
16+
-- doc/cookbook/jwt-and-basic-auth
17+
doc/cookbook/pagination
18+
doc/cookbook/structuring-apis
19+
doc/cookbook/using-custom-monad
920

1021
allow-newer:
11-
servant-js:servant,
12-
servant-js:servant-foreign,
1322
servant-auth-server:http-types,
14-
servant-multipart:lens,
15-
servant-multipart:resourcet,
16-
servant-multipart:servant,
17-
servant-multipart:servant-server,
1823
servant-auth-server:servant-server
1924

2025
constraints:
2126
-- see https://github.com/haskell-infra/hackage-trustees/issues/119
2227
foundation >=0.0.14,
2328
memory <0.14.12 || >0.14.12
29+
30+
allow-newer:
31+
http-media:base

doc/cookbook/basic-auth/basic-auth.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
1212

1313
executable cookbook-basic-auth
1414
main-is: BasicAuth.lhs

doc/cookbook/db-postgres-pool/db-postgres-pool.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
1212

1313
executable cookbook-db-postgres-pool
1414
main-is: PostgresPool.lhs

doc/cookbook/db-sqlite-simple/db-sqlite-simple.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
1212

1313
executable cookbook-db-sqlite-simple
1414
main-is: DBConnection.lhs

doc/cookbook/file-upload/file-upload.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
1212

1313
executable cookbook-file-upload
1414
main-is: FileUpload.lhs

doc/cookbook/https/https.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
11+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
1212

1313
executable cookbook-https
1414
main-is: Https.lhs

doc/cookbook/jwt-and-basic-auth/jwt-and-basic-auth.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainer: [email protected]
1111
category: Servant
1212
build-type: Simple
1313
cabal-version: >=1.10
14-
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2
14+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
1515

1616
executable cookbook-jwt-and-basic-auth
1717
if !impl(ghc >= 7.10)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```haskell
2+
module Main (main) where
3+
main :: IO ()
4+
main = return ()
5+
```

doc/cookbook/pagination/pagination.cabal

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,25 @@ author: Servant Contributors
88
maintainer: [email protected]
99
build-type: Simple
1010
cabal-version: >=1.10
11+
extra-source-files:
12+
Pagination.lhs
13+
dummy/Pagination.lhs
14+
tested-with: GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
1115

1216
executable cookbook-pagination
13-
if impl(ghc < 7.10.1)
14-
buildable: False
1517
main-is: Pagination.lhs
16-
build-depends: base == 4.*
17-
, aeson
18-
, servant
19-
, servant-server
20-
, servant-pagination >= 2.1.0 && < 3.0.0
21-
, warp
18+
build-tool-depends: markdown-unlit:markdown-unlit
2219
default-language: Haskell2010
2320
ghc-options: -Wall -pgmL markdown-unlit
24-
build-tool-depends: markdown-unlit:markdown-unlit
21+
22+
if impl(ghc >= 8.0)
23+
hs-source-dirs: .
24+
build-depends: base >= 4.8 && <4.12
25+
, aeson
26+
, servant
27+
, servant-server
28+
, servant-pagination >= 2.1.0 && < 3.0.0
29+
, warp
30+
else
31+
hs-source-dirs: dummy
32+
build-depends: base

0 commit comments

Comments
 (0)