Skip to content

Commit

Permalink
Merge pull request #31 from schell/servant-0.16
Browse files Browse the repository at this point in the history
Support for servant-0.16 WIP
  • Loading branch information
cdepillabout authored Apr 12, 2019
2 parents 776b7f3 + cb3f8f2 commit 64c7a2b
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 134 deletions.
56 changes: 40 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,18 @@ matrix:
#- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7
# compiler: ": #GHC 7.10.3"
# addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
- env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
compiler: ": #GHC 8.0.2"
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
# - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7
# compiler: ": #GHC 8.0.2"
# addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
- env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7
compiler: ": #GHC 8.2.2"
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
- env: BUILD=cabal GHCVER=8.4.1 CABALVER=2.0 HAPPYVER=1.19.5 ALEXVER=3.1.7
compiler: ": #GHC 8.4.1"
addons: {apt: {packages: [cabal-install-2.0,ghc-8.4.1,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
- env: BUILD=cabal GHCVER=8.4.4 CABALVER=2.2 HAPPYVER=1.19.5 ALEXVER=3.1.7
compiler: ": #GHC 8.4.4"
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.4,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}
- env: BUILD=cabal GHCVER=8.6.3 CABALVER=2.4 HAPPYVER=1.19.5 ALEXVER=3.1.7
compiler: ": #GHC 8.6.3"
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.3,happy-1.19.5,alex-3.1.7], sources: [hvr-ghc]}}

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

- env: BUILD=stack ARGS="--resolver lts-11"
compiler: ": #stack 8.2.2"
addons: {apt: {packages: [libgmp-dev]}}
# - env: BUILD=stack ARGS="--resolver lts-11"
# compiler: ": #stack 8.2.2"
# addons: {apt: {packages: [libgmp-dev]}}

# - env: BUILD=stack ARGS="--resolver lts-12"
# compiler: ": #stack 8.4.4"
# addons: {apt: {packages: [libgmp-dev]}}

# - env: BUILD=stack ARGS="--resolver lts-13"
# compiler: ": #stack 8.6.3"
# addons: {apt: {packages: [libgmp-dev]}}

# Nightly builds are allowed to fail
- env: BUILD=stack ARGS="--resolver nightly"
Expand Down Expand Up @@ -134,9 +145,17 @@ matrix:
# compiler: ": #stack 8.0.2 osx"
# os: osx

- env: BUILD=stack ARGS="--resolver lts-11"
compiler: ": #stack 8.2.2 osx"
os: osx
# - env: BUILD=stack ARGS="--resolver lts-11"
# compiler: ": #stack 8.2.2 osx"
# os: osx

# - env: BUILD=stack ARGS="--resolver lts-12"
# compiler: ": #stack 8.4.4 osx"
# os: osx

# - env: BUILD=stack ARGS="--resolver lts-13"
# compiler: ": #stack 8.6.3 osx"
# os: osx

- env: BUILD=stack ARGS="--resolver nightly"
compiler: ": #stack nightly osx"
Expand Down Expand Up @@ -180,9 +199,14 @@ install:
case "$BUILD" in
stack)
# Add in extra-deps for older snapshots, as necessary
stack --no-terminal --install-ghc $ARGS test --bench --dry-run || ( \
stack --no-terminal $ARGS build cabal-install && \
stack --no-terminal $ARGS solver --update-config)
#
# This is disabled by default, as relying on the solver like this can
# make builds unreliable. Instead, if you have this situation, it's
# recommended that you maintain multiple stack-lts-X.yaml files.
#stack --no-terminal --install-ghc $ARGS test --bench --dry-run || ( \
# stack --no-terminal $ARGS build cabal-install && \
# stack --no-terminal $ARGS solver --update-config)
# Build the dependencies
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
Expand All @@ -206,7 +230,7 @@ script:
set -ex
case "$BUILD" in
stack)
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --flag servant-checked-exceptions:buildexample
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps --flag servant-checked-exceptions:buildexample --flag servant-checked-exceptions-core:buildexample
;;
cabal)
cabal install --enable-tests --enable-benchmarks --force-reinstalls --ghc-options=-O0 --reorder-goals --max-backjumps=-1 $CABALARGS $PACKAGES
Expand Down
6 changes: 6 additions & 0 deletions servant-checked-exceptions-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.1.0.0

* Add support for servant-0.16 and remove support for all previous version of
servant. [#31](https://github.com/cdepillabout/servant-checked-exceptions/pull/31)
Thanks [Schell Carl Scivally](https://github.com/schell)!

## 2.0.0.0

* Initial release of `servant-checked-exceptions-core` package, with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: servant-checked-exceptions-core
version: 2.0.0.0
version: 2.1.0.0
synopsis: Checked exceptions for Servant APIs.
description: Please see <https://github.com/cdepillabout/servant-checked-exceptions#readme README.md>.
homepage: https://github.com/cdepillabout/servant-checked-exceptions
Expand All @@ -8,7 +8,7 @@ license-file: LICENSE
author: Dennis Gosnell
maintainer: [email protected]
copyright: 2017-2018 Dennis Gosnell
category: Text
category: Web
build-type: Simple
extra-source-files: CHANGELOG.md
, README.md
Expand All @@ -34,7 +34,6 @@ library
build-depends: base >= 4.9 && < 5
, aeson
, bytestring
, deepseq
, http-media
, http-types
, profunctors
Expand All @@ -48,7 +47,7 @@ library
other-extensions: QuasiQuotes
, TemplateHaskell

executable servant-checked-exceptions-example-docs
executable servant-checked-exceptions-core-example-docs
main-is: Docs.hs
other-modules: Api
hs-source-dirs: example
Expand All @@ -68,7 +67,7 @@ executable servant-checked-exceptions-example-docs
else
buildable: False

test-suite servant-checked-exceptions-doctest
test-suite servant-checked-exceptions-core-doctest
if impl(ghcjs)
buildable: False
type: exitcode-stdio-1.0
Expand Down
8 changes: 7 additions & 1 deletion servant-checked-exceptions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.1.0.0

* Add support for servant-0.16 and remove support for all previous version of
servant. [#31](https://github.com/cdepillabout/servant-checked-exceptions/pull/31)
Thanks [Schell Carl Scivally](https://github.com/schell)!

## 2.0.0.0

* Split into two package `servant-checked-exceptions-core` and
Expand All @@ -6,7 +12,7 @@
the latter reexports the former and adds instances for `HasServer`
and `HasClient`. The rationale is described further in
[issue 25](https://github.com/cdepillabout/servant-checked-exceptions/issues/25)

Most users should only depend on `servant-checked-exceptions`.
But users who need access to core types without incurring a dependency
on `servant-server` and `servant-client` can depend on
Expand Down
63 changes: 0 additions & 63 deletions servant-checked-exceptions/example/Docs.hs

This file was deleted.

43 changes: 7 additions & 36 deletions servant-checked-exceptions/servant-checked-exceptions.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: servant-checked-exceptions
version: 2.0.0.0
version: 2.1.0.0
synopsis: Checked exceptions for Servant APIs.
description: Please see <https://github.com/cdepillabout/servant-checked-exceptions#readme README.md>.
homepage: https://github.com/cdepillabout/servant-checked-exceptions
Expand All @@ -8,7 +8,7 @@ license-file: LICENSE
author: Dennis Gosnell
maintainer: [email protected]
copyright: 2017-2018 Dennis Gosnell
category: Text
category: Web
build-type: Simple
extra-source-files: CHANGELOG.md
, README.md
Expand All @@ -27,20 +27,13 @@ library
, Servant.Checked.Exceptions.Internal.Servant.Client
, Servant.Checked.Exceptions.Internal.Servant.Server
build-depends: base >= 4.9 && < 5
, aeson
, bytestring
, deepseq
, http-media
, http-types
, profunctors
, tagged
, servant >= 0.12
, servant >= 0.16
, servant-checked-exceptions-core
, servant-client >= 0.12
, servant-client-core >= 0.12
, servant-docs >= 0.10
, servant-server >= 0.12
, text
, servant-client >= 0.16
, servant-client-core >= 0.16
, servant-server >= 0.16
, wai
, world-peace
default-language: Haskell2010
Expand Down Expand Up @@ -70,26 +63,6 @@ executable servant-checked-exceptions-example-client
else
buildable: False

executable servant-checked-exceptions-example-docs
main-is: Docs.hs
other-modules: Api
hs-source-dirs: example
build-depends: base
, aeson
, http-api-data
, http-types
, servant
, servant-checked-exceptions
, servant-docs
, text
default-language: Haskell2010
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N

if flag(buildexample)
buildable: True
else
buildable: False

executable servant-checked-exceptions-example-server
main-is: Server.hs
other-modules: Api
Expand All @@ -98,7 +71,6 @@ executable servant-checked-exceptions-example-server
, aeson
, http-api-data
, http-types
, natural-transformation
, servant
, servant-checked-exceptions
, servant-server
Expand All @@ -119,11 +91,10 @@ test-suite servant-checked-exceptions-test
other-modules:
hs-source-dirs: test
build-depends: base
, bytestring
, hspec-wai
, http-types
, tasty
, tasty-hspec
, tasty-hspec >= 0.2
, tasty-hunit
, servant
, servant-checked-exceptions
Expand Down
Loading

0 comments on commit 64c7a2b

Please sign in to comment.