From 3bf4b100a825c95c0674d7860b3f7e735c00f8ea Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Thu, 23 Jan 2020 12:31:41 +0200 Subject: [PATCH] Bump version to 0.17 --- .travis.yml | 58 ++++++----- cabal.project | 5 + servant-client-core/servant-client-core.cabal | 4 +- servant-client/servant-client.cabal | 10 +- servant-conduit/servant-conduit.cabal | 8 +- servant-docs/servant-docs.cabal | 4 +- servant-foreign/servant-foreign.cabal | 5 +- .../servant-http-streams.cabal | 10 +- servant-machines/servant-machines.cabal | 8 +- servant-pipes/servant-pipes.cabal | 7 +- servant-server/servant-server.cabal | 2 +- servant/CHANGELOG.md | 97 +++++++++++++++++++ servant/servant.cabal | 2 +- 13 files changed, 160 insertions(+), 60 deletions(-) diff --git a/.travis.yml b/.travis.yml index 632806a8..6fd6ef9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.9.20200110 +# version: 0.9.20200121 # version: ~> 1.0 language: c @@ -75,39 +75,31 @@ before_install: - echo $HCNUMVER - CABAL="$CABAL -vnormal+nowrap" - set -o pipefail -install: - - ${CABAL} --version - - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" - - node --version - - echo $GHCJS - TEST=--enable-tests - BENCH=--enable-benchmarks - HEADHACKAGE=false - rm -f $CABALHOME/config - | - echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config - echo "remote-build-reporting: anonymous" >> $CABALHOME/config - echo "write-ghc-environment-files: always" >> $CABALHOME/config - echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config - echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config - echo "world-file: $CABALHOME/world" >> $CABALHOME/config - echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config - echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config - echo "installdir: $CABALHOME/bin" >> $CABALHOME/config - echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config - echo "store-dir: $CABALHOME/store" >> $CABALHOME/config - echo "install-dirs user" >> $CABALHOME/config - echo " prefix: $CABALHOME" >> $CABALHOME/config - echo "repository hackage.haskell.org" >> $CABALHOME/config - echo " url: http://hackage.haskell.org/" >> $CABALHOME/config - echo " secure: True" >> $CABALHOME/config - echo " key-threshold: 3" >> $CABALHOME/config - echo " root-keys:" >> $CABALHOME/config - echo " fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0" >> $CABALHOME/config - echo " 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42" >> $CABALHOME/config - echo " 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3" >> $CABALHOME/config - echo " 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d" >> $CABALHOME/config - echo " 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921" >> $CABALHOME/config + echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config + echo "remote-build-reporting: anonymous" >> $CABALHOME/config + echo "write-ghc-environment-files: always" >> $CABALHOME/config + echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config + echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config + echo "world-file: $CABALHOME/world" >> $CABALHOME/config + echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config + echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config + echo "installdir: $CABALHOME/bin" >> $CABALHOME/config + echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config + echo "store-dir: $CABALHOME/store" >> $CABALHOME/config + echo "install-dirs user" >> $CABALHOME/config + echo " prefix: $CABALHOME" >> $CABALHOME/config + echo "repository hackage.haskell.org" >> $CABALHOME/config + echo " url: http://hackage.haskell.org/" >> $CABALHOME/config +install: + - ${CABAL} --version + - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]" + - node --version + - echo $GHCJS - GHCJOBS=-j2 - | echo "program-default-options" >> $CABALHOME/config @@ -157,6 +149,9 @@ install: echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project echo "allow-newer: io-streams-1.5.1.0:primitive" >> cabal.project echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project + echo "allow-newer: servant" >> cabal.project + echo "allow-newer: servant-server" >> cabal.project + echo "allow-newer: servant-client" >> cabal.project echo "optimization: False" >> cabal.project - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-file-upload|cookbook-generic|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true @@ -259,6 +254,9 @@ script: echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project echo "allow-newer: io-streams-1.5.1.0:primitive" >> cabal.project echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project + echo "allow-newer: servant" >> cabal.project + echo "allow-newer: servant-server" >> cabal.project + echo "allow-newer: servant-client" >> cabal.project echo "optimization: False" >> cabal.project - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-file-upload|cookbook-generic|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done" - cat cabal.project || true @@ -318,5 +316,5 @@ script: - if ! $GHCJS ; then ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all ; fi - echo -en 'travis_fold:end:haddock\\r' -# REGENDATA ("0.9.20200110",["--config=cabal.haskell-ci","--output=.travis.yml","cabal.project"]) +# REGENDATA ("0.9.20200121",["--config=cabal.haskell-ci","--output=.travis.yml","cabal.project"]) # EOF diff --git a/cabal.project b/cabal.project index 4f29900b..f31d0ecc 100644 --- a/cabal.project +++ b/cabal.project @@ -65,3 +65,8 @@ constraints: base-compat ^>=0.11 -- needed for doctests write-ghc-environment-files: always + +-- servant-0.17 +allow-newer: servant +allow-newer: servant-server +allow-newer: servant-client diff --git a/servant-client-core/servant-client-core.cabal b/servant-client-core/servant-client-core.cabal index 7d949584..3d1055db 100644 --- a/servant-client-core/servant-client-core.cabal +++ b/servant-client-core/servant-client-core.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant-client-core -version: 0.16 +version: 0.17 synopsis: Core functionality and class for client function generation for servant APIs category: Servant, Web @@ -69,7 +69,7 @@ library -- Servant dependencies build-depends: - servant >= 0.16 && <0.17 + servant >= 0.17 && <0.18 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. diff --git a/servant-client/servant-client.cabal b/servant-client/servant-client.cabal index 0eb9152c..bdbecc0c 100644 --- a/servant-client/servant-client.cabal +++ b/servant-client/servant-client.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant-client -version: 0.16.0.1 +version: 0.17 synopsis: Automatic derivation of querying functions for servant category: Servant, Web @@ -62,8 +62,8 @@ library -- Servant dependencies. -- Strict dependency on `servant-client-core` as we re-export things. build-depends: - servant == 0.16.* - , servant-client-core >= 0.16 && <0.16.1 + servant == 0.17.* + , servant-client-core >= 0.17 && <0.17.1 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. @@ -127,8 +127,8 @@ test-suite spec , HUnit >= 1.6.0.0 && < 1.7 , network >= 2.8.0.0 && < 3.2 , QuickCheck >= 2.12.6.1 && < 2.14 - , servant == 0.16.* - , servant-server == 0.16.* + , servant == 0.17.* + , servant-server == 0.17.* , tdigest >= 0.2 && < 0.3 build-tool-depends: diff --git a/servant-conduit/servant-conduit.cabal b/servant-conduit/servant-conduit.cabal index 8c1abaaa..154af5db 100644 --- a/servant-conduit/servant-conduit.cabal +++ b/servant-conduit/servant-conduit.cabal @@ -1,7 +1,7 @@ cabal-version: >=1.10 name: servant-conduit version: 0.15 -x-revision: 1 +x-revision: 3 synopsis: Servant Stream support for conduit. category: Servant, Web, Enumerator @@ -39,7 +39,7 @@ library , conduit >=1.3.1 && <1.4 , mtl >=2.2.2 && <2.3 , resourcet >=1.2.2 && <1.3 - , servant >=0.15 && <0.17 + , servant >=0.15 && <0.18 , unliftio-core >=0.1.2.0 && <0.2 hs-source-dirs: src default-language: Haskell2010 @@ -60,8 +60,8 @@ test-suite example , resourcet , servant , servant-conduit - , servant-server >=0.15 && <0.17 - , servant-client >=0.15 && <0.17 + , servant-server >=0.15 && <0.18 + , servant-client >=0.15 && <0.18 , wai >=3.2.1.2 && <3.3 , warp >=3.2.25 && <3.4 , http-client diff --git a/servant-docs/servant-docs.cabal b/servant-docs/servant-docs.cabal index 293cf514..d5912394 100644 --- a/servant-docs/servant-docs.cabal +++ b/servant-docs/servant-docs.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant-docs -version: 0.11.4 +version: 0.11.5 synopsis: generate API docs for your servant webservice category: Servant, Web @@ -52,7 +52,7 @@ library -- Servant dependencies build-depends: - servant >= 0.15 && <0.17 + servant >= 0.17 && <0.18 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. diff --git a/servant-foreign/servant-foreign.cabal b/servant-foreign/servant-foreign.cabal index 32693593..399e3870 100644 --- a/servant-foreign/servant-foreign.cabal +++ b/servant-foreign/servant-foreign.cabal @@ -1,7 +1,6 @@ cabal-version: >=1.10 name: servant-foreign -version: 0.15 -x-revision: 1 +version: 0.15.1 synopsis: Helpers for generating clients for servant APIs in any programming language category: Servant, Web @@ -52,7 +51,7 @@ library -- Servant dependencies build-depends: - servant >=0.15 && <0.17 + servant >=0.17 && <0.18 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. diff --git a/servant-http-streams/servant-http-streams.cabal b/servant-http-streams/servant-http-streams.cabal index 977b44ea..3a9ee9c5 100644 --- a/servant-http-streams/servant-http-streams.cabal +++ b/servant-http-streams/servant-http-streams.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant-http-streams -version: 0.16 +version: 0.17 synopsis: Automatic derivation of querying functions for servant category: Servant, Web @@ -59,8 +59,8 @@ library -- Servant dependencies. -- Strict dependency on `servant-client-core` as we re-export things. build-depends: - servant == 0.16.* - , servant-client-core >= 0.16 && <0.16.1 + servant == 0.17.* + , servant-client-core >= 0.17 && <0.17.1 -- Other dependencies: Lower bound around what is in the latest Stackage LTS. -- Here can be exceptions if we really need features from the newer versions. @@ -121,8 +121,8 @@ test-suite spec , HUnit >= 1.6.0.0 && < 1.7 , network >= 2.8.0.0 && < 3.2 , QuickCheck >= 2.12.6.1 && < 2.14 - , servant == 0.16.* - , servant-server == 0.16.* + , servant == 0.17.* + , servant-server == 0.17.* , tdigest >= 0.2 && < 0.3 build-tool-depends: diff --git a/servant-machines/servant-machines.cabal b/servant-machines/servant-machines.cabal index 293c109f..0603ff58 100644 --- a/servant-machines/servant-machines.cabal +++ b/servant-machines/servant-machines.cabal @@ -1,7 +1,7 @@ cabal-version: >=1.10 name: servant-machines version: 0.15 -x-revision: 1 +x-revision: 4 synopsis: Servant Stream support for machines category: Servant, Web, Enumerator @@ -38,7 +38,7 @@ library , bytestring >=0.10.8.1 && <0.11 , machines >=0.6.4 && <0.8 , mtl >=2.2.2 && <2.3 - , servant >=0.15 && <0.17 + , servant >=0.15 && <0.18 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall @@ -57,8 +57,8 @@ test-suite example , servant , machines , servant-machines - , servant-server >=0.15 && <0.17 - , servant-client >=0.15 && <0.17 + , servant-server >=0.15 && <0.18 + , servant-client >=0.15 && <0.18 , wai >=3.2.1.2 && <3.3 , warp >=3.2.25 && <3.4 , http-client diff --git a/servant-pipes/servant-pipes.cabal b/servant-pipes/servant-pipes.cabal index bfdd2213..79ca52f4 100644 --- a/servant-pipes/servant-pipes.cabal +++ b/servant-pipes/servant-pipes.cabal @@ -1,6 +1,7 @@ cabal-version: >=1.10 name: servant-pipes version: 0.15.1 +x-revision: 1 synopsis: Servant Stream support for pipes category: Servant, Web, Pipes @@ -39,7 +40,7 @@ library , pipes-safe >=2.3.1 && <2.4 , mtl >=2.2.2 && <2.3 , monad-control >=1.0.2.3 && <1.1 - , servant >=0.15 && <0.17 + , servant >=0.15 && <0.18 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall @@ -60,8 +61,8 @@ test-suite example , pipes-safe , servant-pipes , pipes-bytestring >=2.1.6 && <2.2 - , servant-server >=0.15 && <0.17 - , servant-client >=0.15 && <0.17 + , servant-server >=0.15 && <0.18 + , servant-client >=0.15 && <0.18 , wai >=3.2.1.2 && <3.3 , warp >=3.2.25 && <3.4 , http-client diff --git a/servant-server/servant-server.cabal b/servant-server/servant-server.cabal index 12882acf..bcd8c436 100644 --- a/servant-server/servant-server.cabal +++ b/servant-server/servant-server.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant-server -version: 0.16 +version: 0.17 synopsis: A family of combinators for defining webservices APIs and serving them category: Servant, Web diff --git a/servant/CHANGELOG.md b/servant/CHANGELOG.md index 8414624d..254d1866 100644 --- a/servant/CHANGELOG.md +++ b/servant/CHANGELOG.md @@ -1,5 +1,102 @@ [The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md) +0.17 +---- + +### Significant changes + +- Add NoContentVerb [#1028](https://github.com/haskell-servant/servant/issues/1028) [#1219](https://github.com/haskell-servant/servant/pull/1219) [#1228](https://github.com/haskell-servant/servant/pull/1228) + + The `NoContent` API endpoints should now use `NoContentVerb` combinator. + The API type changes are usually of the kind + + ```diff + - :<|> PostNoContent '[JSON] NoContent + + :<|> PostNoContent + ``` + + i.e. one doesn't need to specify the content-type anymore. There is no content. + +- `Capture` can be `Lenient` [#1155](https://github.com/haskell-servant/servant/issues/1155) [#1156](https://github.com/haskell-servant/servant/pull/1156) + + You can specify a lenient capture as + + ```haskell + :<|> "capture-lenient" :> Capture' '[Lenient] "foo" Int :> GET + ``` + + which will make the capture always succeed. Handlers will be of the + type `Either String CapturedType`, where `Left err` represents + the possible parse failure. + +- *servant-client* Added a function to create Client.Request in ClientEnv [#1213](https://github.com/haskell-servant/servant/pull/1213) [#1255](https://github.com/haskell-servant/servant/pull/1255) + + The new member `makeClientRequest` of `ClientEnv` is used to create + `http-client` `Request` from `servant-client-core` `Request`. + This functionality can be used for example to set + dynamic timeouts for each request. + +- *servant-server* use queryString to parse QueryParam, QueryParams and QueryFlag [#1249](https://github.com/haskell-servant/servant/pull/1249) [#1262](https://github.com/haskell-servant/servant/pull/1262) + + Some APIs need query parameters rewriting, e.g. in order to support + for multiple casing (camel, snake, etc) or something to that effect. + + This could be easily achieved by using WAI Middleware and modyfing + request's `Query`. But QueryParam, QueryParams and QueryFlag use + `rawQueryString`. By using `queryString` rather then `rawQueryString` + we can enable such rewritings. + +- *servant* *servant-server* Make packages `build-type: Simple` [#1263](https://github.com/haskell-servant/servant/pull/1263) + + We used `build-type: Custom`, but it's problematic e.g. + for cross-compiling. The benefit is small, as the doctests + can be run other ways too (though not so conviniently). + +### Other changes + +- *servant-client* *servant-client-core* *servant-http-streams* Fix Verb with headers checking content type differently [#1200](https://github.com/haskell-servant/servant/issues/1200) [#1204](https://github.com/haskell-servant/servant/pull/1204) + + For `Verb`s with response `Headers`, the implementation didn't check + for the content-type of the response. Now it does. + +- *servant-docs* Merge documentation from duplicate routes [#1240](https://github.com/haskell-servant/servant/issues/1240) [#1241](https://github.com/haskell-servant/servant/pull/1241) + + Servant supports defining the same route multiple times with different + content-types and result-types, but servant-docs was only documenting + the first of copy of such duplicated routes. It now combines the + documentation from all the copies. + + Unfortunately, it is not yet possible for the documentation to specify + multiple status codes. + +- Add sponsorship button [#1190](https://github.com/haskell-servant/servant/pull/1190) + + [Well-Typed](https://www.well-typed.com/) is a consultancy which could help you with `servant` issues + (See consultancies section on https://www.servant.dev/). + +- Try changelog-d for changelog management [#1230](https://github.com/haskell-servant/servant/pull/1230) + + Check the [CONTRIBUTING.md](https://github.com/haskell-servant/servant/blob/master/CONTRIBUTING.md) for details + +- CI and testing tweaks. [#1154](https://github.com/haskell-servant/servant/pull/1154) [#1157](https://github.com/haskell-servant/servant/pull/1157) [#1182](https://github.com/haskell-servant/servant/pull/1182) [#1214](https://github.com/haskell-servant/servant/pull/1214) [#1229](https://github.com/haskell-servant/servant/pull/1229) [#1233](https://github.com/haskell-servant/servant/pull/1233) [#1242](https://github.com/haskell-servant/servant/pull/1242) [#1247](https://github.com/haskell-servant/servant/pull/1247) [#1250](https://github.com/haskell-servant/servant/pull/1250) [#1258](https://github.com/haskell-servant/servant/pull/1258) + + We are experiencing some bitrotting of cookbook recipe dependencies, + therefore some of them aren't build as part of our CI anymore. + +- New cookbook recipes [#1088](https://github.com/haskell-servant/servant/pull/1088) [#1171](https://github.com/haskell-servant/servant/pull/1171) [#1198](https://github.com/haskell-servant/servant/pull/1198) + + - [OIDC Recipe](#TODO) + - [MySQL Recipe](#TODO) + +- *servant-jsaddle* Progress on servant-jsaddle [#1216](https://github.com/haskell-servant/servant/pull/1216) +- *servant-docs* Prevent race-conditions in testing [#1194](https://github.com/haskell-servant/servant/pull/1194) +- *servant-client* *servant-http-streams* `HasClient` instance for `Stream` with `Headers` [#1170](https://github.com/haskell-servant/servant/issues/1170) [#1197](https://github.com/haskell-servant/servant/pull/1197) +- *servant* Remove unused extensions from cabal file [#1201](https://github.com/haskell-servant/servant/pull/1201) +- *servant-client* Redact the authorization header in Show and exceptions [#1238](https://github.com/haskell-servant/servant/pull/1238) +- Dependency upgrades [#1173](https://github.com/haskell-servant/servant/pull/1173) [#1181](https://github.com/haskell-servant/servant/pull/1181) [#1183](https://github.com/haskell-servant/servant/pull/1183) [#1188](https://github.com/haskell-servant/servant/pull/1188) [#1224](https://github.com/haskell-servant/servant/pull/1224) [#1245](https://github.com/haskell-servant/servant/pull/1245) [#1257](https://github.com/haskell-servant/servant/pull/1257) +- Documentation updates [#1162](https://github.com/haskell-servant/servant/pull/1162) [#1174](https://github.com/haskell-servant/servant/pull/1174) [#1175](https://github.com/haskell-servant/servant/pull/1175) [#1234](https://github.com/haskell-servant/servant/pull/1234) [#1244](https://github.com/haskell-servant/servant/pull/1244) [#1247](https://github.com/haskell-servant/servant/pull/1247) + + 0.16.2 ------ diff --git a/servant/servant.cabal b/servant/servant.cabal index 783099a9..9a571d45 100644 --- a/servant/servant.cabal +++ b/servant/servant.cabal @@ -1,6 +1,6 @@ cabal-version: >=1.10 name: servant -version: 0.16 +version: 0.17 synopsis: A family of combinators for defining webservices APIs category: Servant, Web