Skip to content

Commit 64c7a2b

Browse files
authored
Merge pull request #31 from schell/servant-0.16
Support for servant-0.16 WIP
2 parents 776b7f3 + cb3f8f2 commit 64c7a2b

File tree

9 files changed

+144
-134
lines changed

9 files changed

+144
-134
lines changed

.travis.yml

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,18 @@ matrix:
5757
#- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
5858
# compiler: ": #GHC 7.10.3"
5959
# addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
60-
- env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
61-
compiler: ": #GHC 8.0.2"
62-
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
60+
# - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
61+
# compiler: ": #GHC 8.0.2"
62+
# addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
6363
- env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7
6464
compiler: ": #GHC 8.2.2"
6565
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
66-
- env: BUILD=cabal GHCVER=8.4.1 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7
67-
compiler: ": #GHC 8.4.1"
68-
addons: {apt: {packages: [cabal-install-2.0,ghc-8.4.1,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
66+
- env: BUILD=cabal GHCVER=8.4.4 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7
67+
compiler: ": #GHC 8.4.4"
68+
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.4,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
69+
- env: BUILD=cabal GHCVER=8.6.3 CABALVER=2.4 HAPPYVER=1.19.5 ALEXVER=3.1.7
70+
compiler: ": #GHC 8.6.3"
71+
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
6972

7073
# Build with the newest GHC and cabal-install. This is an accepted failure,
7174
# see below.
@@ -99,9 +102,17 @@ matrix:
99102
# compiler: ": #stack 8.0.2"
100103
# addons: {apt: {packages: [libgmp-dev]}}
101104

102-
- env: BUILD=stack ARGS="--resolver lts-11"
103-
compiler: ": #stack 8.2.2"
104-
addons: {apt: {packages: [libgmp-dev]}}
105+
# - env: BUILD=stack ARGS="--resolver lts-11"
106+
# compiler: ": #stack 8.2.2"
107+
# addons: {apt: {packages: [libgmp-dev]}}
108+
109+
# - env: BUILD=stack ARGS="--resolver lts-12"
110+
# compiler: ": #stack 8.4.4"
111+
# addons: {apt: {packages: [libgmp-dev]}}
112+
113+
# - env: BUILD=stack ARGS="--resolver lts-13"
114+
# compiler: ": #stack 8.6.3"
115+
# addons: {apt: {packages: [libgmp-dev]}}
105116

106117
# Nightly builds are allowed to fail
107118
- env: BUILD=stack ARGS="--resolver nightly"
@@ -134,9 +145,17 @@ matrix:
134145
# compiler: ": #stack 8.0.2 osx"
135146
# os: osx
136147

137-
- env: BUILD=stack ARGS="--resolver lts-11"
138-
compiler: ": #stack 8.2.2 osx"
139-
os: osx
148+
# - env: BUILD=stack ARGS="--resolver lts-11"
149+
# compiler: ": #stack 8.2.2 osx"
150+
# os: osx
151+
152+
# - env: BUILD=stack ARGS="--resolver lts-12"
153+
# compiler: ": #stack 8.4.4 osx"
154+
# os: osx
155+
156+
# - env: BUILD=stack ARGS="--resolver lts-13"
157+
# compiler: ": #stack 8.6.3 osx"
158+
# os: osx
140159

141160
- env: BUILD=stack ARGS="--resolver nightly"
142161
compiler: ": #stack nightly osx"
@@ -180,9 +199,14 @@ install:
180199
case "$BUILD" in
181200
stack)
182201
# Add in extra-deps for older snapshots, as necessary
183-
stack --no-terminal --install-ghc $ARGS test --bench --dry-run || ( \
184-
stack --no-terminal $ARGS build cabal-install && \
185-
stack --no-terminal $ARGS solver --update-config)
202+
#
203+
# This is disabled by default, as relying on the solver like this can
204+
# make builds unreliable. Instead, if you have this situation, it's
205+
# recommended that you maintain multiple stack-lts-X.yaml files.
206+
207+
#stack --no-terminal --install-ghc $ARGS test --bench --dry-run || ( \
208+
# stack --no-terminal $ARGS build cabal-install && \
209+
# stack --no-terminal $ARGS solver --update-config)
186210
187211
# Build the dependencies
188212
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
@@ -206,7 +230,7 @@ script:
206230
set -ex
207231
case "$BUILD" in
208232
stack)
209-
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --flag servant-checked-exceptions:buildexample
233+
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --flag servant-checked-exceptions:buildexample --flag servant-checked-exceptions-core:buildexample
210234
;;
211235
cabal)
212236
cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES

servant-checked-exceptions-core/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.1.0.0
2+
3+
* Add support for servant-0.16 and remove support for all previous version of
4+
servant. [#31](https://github.com/cdepillabout/servant-checked-exceptions/pull/31)
5+
Thanks [Schell Carl Scivally](https://github.com/schell)!
6+
17
## 2.0.0.0
28

39
* Initial release of `servant-checked-exceptions-core` package, with

servant-checked-exceptions-core/servant-checked-exceptions-core.cabal

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: servant-checked-exceptions-core
2-
version: 2.0.0.0
2+
version: 2.1.0.0
33
synopsis: Checked exceptions for Servant APIs.
44
description: Please see <https://github.com/cdepillabout/servant-checked-exceptions#readme README.md>.
55
homepage: https://github.com/cdepillabout/servant-checked-exceptions
@@ -8,7 +8,7 @@ license-file: LICENSE
88
author: Dennis Gosnell
99
maintainer: [email protected]
1010
copyright: 2017-2018 Dennis Gosnell
11-
category: Text
11+
category: Web
1212
build-type: Simple
1313
extra-source-files: CHANGELOG.md
1414
, README.md
@@ -34,7 +34,6 @@ library
3434
build-depends: base >= 4.9 && < 5
3535
, aeson
3636
, bytestring
37-
, deepseq
3837
, http-media
3938
, http-types
4039
, profunctors
@@ -48,7 +47,7 @@ library
4847
other-extensions: QuasiQuotes
4948
, TemplateHaskell
5049

51-
executable servant-checked-exceptions-example-docs
50+
executable servant-checked-exceptions-core-example-docs
5251
main-is: Docs.hs
5352
other-modules: Api
5453
hs-source-dirs: example
@@ -68,7 +67,7 @@ executable servant-checked-exceptions-example-docs
6867
else
6968
buildable: False
7069

71-
test-suite servant-checked-exceptions-doctest
70+
test-suite servant-checked-exceptions-core-doctest
7271
if impl(ghcjs)
7372
buildable: False
7473
type: exitcode-stdio-1.0

servant-checked-exceptions/CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 2.1.0.0
2+
3+
* Add support for servant-0.16 and remove support for all previous version of
4+
servant. [#31](https://github.com/cdepillabout/servant-checked-exceptions/pull/31)
5+
Thanks [Schell Carl Scivally](https://github.com/schell)!
6+
17
## 2.0.0.0
28

39
* Split into two package `servant-checked-exceptions-core` and
@@ -6,7 +12,7 @@
612
the latter reexports the former and adds instances for `HasServer`
713
and `HasClient`. The rationale is described further in
814
[issue 25](https://github.com/cdepillabout/servant-checked-exceptions/issues/25)
9-
15+
1016
Most users should only depend on `servant-checked-exceptions`.
1117
But users who need access to core types without incurring a dependency
1218
on `servant-server` and `servant-client` can depend on

servant-checked-exceptions/example/Docs.hs

Lines changed: 0 additions & 63 deletions
This file was deleted.

servant-checked-exceptions/servant-checked-exceptions.cabal

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: servant-checked-exceptions
2-
version: 2.0.0.0
2+
version: 2.1.0.0
33
synopsis: Checked exceptions for Servant APIs.
44
description: Please see <https://github.com/cdepillabout/servant-checked-exceptions#readme README.md>.
55
homepage: https://github.com/cdepillabout/servant-checked-exceptions
@@ -8,7 +8,7 @@ license-file: LICENSE
88
author: Dennis Gosnell
99
maintainer: [email protected]
1010
copyright: 2017-2018 Dennis Gosnell
11-
category: Text
11+
category: Web
1212
build-type: Simple
1313
extra-source-files: CHANGELOG.md
1414
, README.md
@@ -27,20 +27,13 @@ library
2727
, Servant.Checked.Exceptions.Internal.Servant.Client
2828
, Servant.Checked.Exceptions.Internal.Servant.Server
2929
build-depends: base >= 4.9 && < 5
30-
, aeson
3130
, bytestring
32-
, deepseq
33-
, http-media
3431
, http-types
35-
, profunctors
36-
, tagged
37-
, servant >= 0.12
32+
, servant >= 0.16
3833
, servant-checked-exceptions-core
39-
, servant-client >= 0.12
40-
, servant-client-core >= 0.12
41-
, servant-docs >= 0.10
42-
, servant-server >= 0.12
43-
, text
34+
, servant-client >= 0.16
35+
, servant-client-core >= 0.16
36+
, servant-server >= 0.16
4437
, wai
4538
, world-peace
4639
default-language: Haskell2010
@@ -70,26 +63,6 @@ executable servant-checked-exceptions-example-client
7063
else
7164
buildable: False
7265

73-
executable servant-checked-exceptions-example-docs
74-
main-is: Docs.hs
75-
other-modules: Api
76-
hs-source-dirs: example
77-
build-depends: base
78-
, aeson
79-
, http-api-data
80-
, http-types
81-
, servant
82-
, servant-checked-exceptions
83-
, servant-docs
84-
, text
85-
default-language: Haskell2010
86-
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N
87-
88-
if flag(buildexample)
89-
buildable: True
90-
else
91-
buildable: False
92-
9366
executable servant-checked-exceptions-example-server
9467
main-is: Server.hs
9568
other-modules: Api
@@ -98,7 +71,6 @@ executable servant-checked-exceptions-example-server
9871
, aeson
9972
, http-api-data
10073
, http-types
101-
, natural-transformation
10274
, servant
10375
, servant-checked-exceptions
10476
, servant-server
@@ -119,11 +91,10 @@ test-suite servant-checked-exceptions-test
11991
other-modules:
12092
hs-source-dirs: test
12193
build-depends: base
122-
, bytestring
12394
, hspec-wai
12495
, http-types
12596
, tasty
126-
, tasty-hspec
97+
, tasty-hspec >= 0.2
12798
, tasty-hunit
12899
, servant
129100
, servant-checked-exceptions

0 commit comments

Comments
 (0)