Skip to content

Commit

Permalink
Merge pull request #1082 from phadej/changelog-0.15b
Browse files Browse the repository at this point in the history
Changelog 0.15b
  • Loading branch information
phadej committed Nov 13, 2018
2 parents 1fb70d3 + 3b8db04 commit e3e5d2b
Show file tree
Hide file tree
Showing 39 changed files with 386 additions and 190 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ install:
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"servant-machines\" \"servant-conduit\" \"servant-pipes\" \"doc/cookbook/basic-auth\" \"doc/cookbook/curl-mock\" \"doc/cookbook/basic-streaming\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/file-upload\" \"doc/cookbook/generic\" \"doc/cookbook/hoist-server-with-context\" \"doc/cookbook/https\" \"doc/cookbook/jwt-and-basic-auth\" \"doc/cookbook/sentry\" \"doc/cookbook/testing\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\" \"doc/cookbook/using-free-client\"\\n' > cabal.project"
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
- "echo 'allow-newer: servant-js:base, servant-pagination:servant, servant-pagination:servant-server,servant-multipart:servant, servant-multipart:servant-server,servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,servant-auth-server:servant, servant-auth-server:servant-server,servant-js:servant, servant-js:servant-foreign,servant-quickcheck:hspec' >> cabal.project"
- "echo 'allow-newer: servant-js:base, servant-pagination:servant, servant-pagination:servant-server,servant-multipart:servant, servant-multipart:servant-server,servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,servant-auth-server:servant, servant-auth-server:servant-server, servant-auth-server:http-api-data,servant-js:servant, servant-js:servant-foreign,servant-quickcheck:hspec' >> cabal.project"
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant | grep -vw -- servant-client | grep -vw -- servant-client-core | grep -vw -- servant-docs | grep -vw -- servant-foreign | grep -vw -- servant-server | grep -vw -- tutorial | grep -vw -- servant-machines | grep -vw -- servant-conduit | grep -vw -- servant-pipes | grep -vw -- cookbook-basic-auth | grep -vw -- cookbook-curl-mock | grep -vw -- cookbook-basic-streaming | grep -vw -- cookbook-db-postgres-pool | grep -vw -- cookbook-db-sqlite-simple | grep -vw -- cookbook-file-upload | grep -vw -- cookbook-generic | grep -vw -- cookbook-hoist-server-with-context | grep -vw -- cookbook-https | grep -vw -- cookbook-jwt-and-basic-auth | grep -vw -- cookbook-sentry | grep -vw -- cookbook-testing | grep -vw -- cookbook-structuring-apis | grep -vw -- cookbook-using-custom-monad | grep -vw -- cookbook-using-free-client | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
Expand Down Expand Up @@ -168,7 +168,7 @@ script:
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal servant-machines-*/*.cabal servant-conduit-*/*.cabal servant-pipes-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-curl-mock-*/*.cabal cookbook-basic-streaming-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-file-upload-*/*.cabal cookbook-generic-*/*.cabal cookbook-hoist-server-with-context-*/*.cabal cookbook-https-*/*.cabal cookbook-jwt-and-basic-auth-*/*.cabal cookbook-sentry-*/*.cabal cookbook-testing-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal cookbook-using-free-client-*/*.cabal\\n' > cabal.project"
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
- "echo 'allow-newer: servant-js:base, servant-pagination:servant, servant-pagination:servant-server,servant-multipart:servant, servant-multipart:servant-server,servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,servant-auth-server:servant, servant-auth-server:servant-server,servant-js:servant, servant-js:servant-foreign,servant-quickcheck:hspec' >> cabal.project"
- "echo 'allow-newer: servant-js:base, servant-pagination:servant, servant-pagination:servant-server,servant-multipart:servant, servant-multipart:servant-server,servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,servant-auth-server:servant, servant-auth-server:servant-server, servant-auth-server:http-api-data,servant-js:servant, servant-js:servant-foreign,servant-quickcheck:hspec' >> cabal.project"
- touch cabal.project.local
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant | grep -vw -- servant-client | grep -vw -- servant-client-core | grep -vw -- servant-docs | grep -vw -- servant-foreign | grep -vw -- servant-server | grep -vw -- tutorial | grep -vw -- servant-machines | grep -vw -- servant-conduit | grep -vw -- servant-pipes | grep -vw -- cookbook-basic-auth | grep -vw -- cookbook-curl-mock | grep -vw -- cookbook-basic-streaming | grep -vw -- cookbook-db-postgres-pool | grep -vw -- cookbook-db-sqlite-simple | grep -vw -- cookbook-file-upload | grep -vw -- cookbook-generic | grep -vw -- cookbook-hoist-server-with-context | grep -vw -- cookbook-https | grep -vw -- cookbook-jwt-and-basic-auth | grep -vw -- cookbook-sentry | grep -vw -- cookbook-testing | grep -vw -- cookbook-structuring-apis | grep -vw -- cookbook-using-custom-monad | grep -vw -- cookbook-using-free-client | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
- cat cabal.project || true
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ allow-newer:
servant-pagination:servant, servant-pagination:servant-server,
servant-multipart:servant, servant-multipart:servant-server,
servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,
servant-auth-server:servant, servant-auth-server:servant-server,
servant-auth-server:servant, servant-auth-server:servant-server, servant-auth-server:http-api-data,
servant-js:servant, servant-js:servant-foreign,
servant-quickcheck:hspec
13 changes: 0 additions & 13 deletions doc/tutorial/tinc.yaml

This file was deleted.

75 changes: 75 additions & 0 deletions servant-client-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,81 @@
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-client-core/CHANGELOG.md)
[Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)

0.15
----

- Streaming refactoring.
[#991](https://github.com/haskell-servant/servant/pull/991)
[#1076](https://github.com/haskell-servant/servant/pull/1076)
[#1077](https://github.com/haskell-servant/servant/pull/1077)

The streaming functionality (`Servant.API.Stream`) is refactored to use
`servant`'s own `SourceIO` type (see `Servant.Types.SourceT` documentation),
which replaces both `StreamGenerator` and `ResultStream` types.

New conversion type-classes are `ToSourceIO` and `FromSourceIO`
(replacing `ToStreamGenerator` and `BuildFromStream`).
There are instances for *conduit*, *pipes* and *machines* in new packages:
[servant-conduit](https://hackage.haskell.org/package/servant-conduit)
[servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
[servant-machines](https://hackage.haskell.org/package/servant-machines)
respectively.

Writing new framing strategies is simpler. Check existing strategies for examples.

This change shouldn't affect you, if you don't use streaming endpoints.

- *servant-client* Separate streaming client.
[#1066](https://github.com/haskell-servant/servant/pull/1066)

We now have two `http-client` based clients,
in `Servant.Client` and `Servant.Client.Streaming`.

Their API is the same, except for
- `Servant.Client` **cannot** request `Stream` endpoints.
- `Servant.Client` is *run* by direct
`runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a)`
- `Servant.Client.Streaming` **can** request `Stream` endpoints.
- `Servant.Client.Streaming` is *used* by CPSised
`withClientM :: ClientM a -> ClientEnv -> (Either ServantError a -> IO b) -> IO b`

To access `Stream` endpoints use `Servant.Client.Streaming` with
`withClientM`; otherwise you can continue using `Servant.Client` with `runClientM`.
You can use both too, `ClientEnv` and `BaseUrl` types are same for both.

**Note:** `Servant.Client.Streaming` doesn't *stream* non-`Stream` endpoints.
Requesting ordinary `Verb` endpoints (e.g. `Get`) will block until
the whole response is received.

There is `Servant.Client.Streaming.runClientM` function, but it has
restricted type. `NFData a` constraint prevents using it with
`SourceT`, `Conduit` etc. response types.

```haskell
runClientM :: NFData a => ClientM a -> ClientEnv -> IO (Either ServantError a)
```

This change shouldn't affect you, if you don't use streaming endpoints.

- *servant-client-core* Related to the previous:
`streamingResponse` is removed from `RunClient`.
We have a new type-class:

```haskell
class RunClient m => RunStreamingClient m where
withStreamingRequest :: Request -> (StreamingResponse -> IO a) -> m a
```

- Drop support for GHC older than 8.0
[#1008](https://github.com/haskell-servant/servant/pull/1008)
[#1009](https://github.com/haskell-servant/servant/pull/1009)

- *servant-client-core* Add `NFData (GenResponse a)` and `NFData ServantError` instances.
[#1076](https://github.com/haskell-servant/servant/pull/1076)

- *servant-client-core* Add `aeson` and `Lift BaseUrl` instances
[#1037](https://github.com/haskell-servant/servant/pull/1037)

0.14.1
------

Expand Down
2 changes: 1 addition & 1 deletion servant-client-core/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017, Servant Contributors
Copyright (c) 2017-2018, Servant Contributors

All rights reserved.

Expand Down
24 changes: 13 additions & 11 deletions servant-client-core/servant-client-core.cabal
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
cabal-version: >=1.10
name: servant-client-core
version: 0.15

synopsis: Core functionality and class for client function generation for servant APIs
category: Servant, Web
description:
This library provides backend-agnostic generation of client functions. For
more information, see the README.

homepage: http://haskell-servant.readthedocs.org/
bug-reports: http://github.com/haskell-servant/servant/issues
license: BSD3
license-file: LICENSE
author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
homepage: http://haskell-servant.readthedocs.org/
bug-reports: http://github.com/haskell-servant/servant/issues
cabal-version: >=1.10
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2017 Servant Contributors
category: Web
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors
build-type: Simple
tested-with:
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.2

extra-source-files:
CHANGELOG.md
README.md
tested-with:
GHC==8.0.2
GHC==8.2.2
GHC==8.4.4
GHC==8.6.2

source-repository head
type: git
Expand Down Expand Up @@ -68,7 +71,6 @@ library
, exceptions >= 0.10.0 && < 0.11
, free >= 5.1 && < 5.2
, generics-sop >= 0.4.0.1 && < 0.5
, http-api-data >= 0.3.10 && < 0.4
, http-media >= 0.7.1.3 && < 0.8
, http-types >= 0.12.2 && < 0.13
, network-uri >= 2.6.1.0 && < 2.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import Network.HTTP.Media
import Network.HTTP.Types
(Header, HeaderName, HttpVersion (..), Method, QueryItem,
Status (..), http11, methodGet)
import Web.HttpApiData
import Servant.API
(ToHttpApiData, toEncodedUrlPiece, toHeader)

-- | A type representing possible errors in a request
Expand Down
2 changes: 1 addition & 1 deletion servant-client-ghcjs/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2016, Zalora South East Asia Pte Ltd, Servant Contributors
Copyright (c) 2014-2016, Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors

All rights reserved.

Expand Down
19 changes: 12 additions & 7 deletions servant-client-ghcjs/servant-client-ghcjs.cabal
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
cabal-version: >=1.10
name: servant-client-ghcjs
version: 0.14
synopsis: automatical derivation of querying functions for servant webservices for ghcjs

synopsis: Automatic derivation of querying functions for servant webservices for GHCJS
category: Servant, Web
description:
This library lets you automatically derive Haskell functions that
let you query each endpoint of a <http://hackage.haskell.org/package/servant servant> webservice.
.
See <http://haskell-servant.readthedocs.org/en/stable/tutorial/Client.html the client section of the tutorial>.
.
<https://github.com/haskell-servant/servant/blob/master/servant-client/CHANGELOG.md CHANGELOG>

homepage: http://haskell-servant.readthedocs.org/
bug-reports: http://github.com/haskell-servant/servant/issues
license: BSD3
license-file: LICENSE
author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2017 Servant Contributors
category: Servant, Web
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors
build-type: Simple
cabal-version: >=1.10
tested-with: GHC >= 7.8
homepage: http://haskell-servant.readthedocs.org/
Bug-reports: http://github.com/haskell-servant/servant/issues
tested-with:
GHC >= 7.8

extra-source-files:
CHANGELOG.md
README.md

source-repository head
type: git
location: http://github.com/haskell-servant/servant.git
Expand Down
5 changes: 0 additions & 5 deletions servant-client-ghcjs/tinc.yaml

This file was deleted.

66 changes: 66 additions & 0 deletions servant-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,72 @@
[The latest version of this document is on GitHub.](https://github.com/haskell-servant/servant/blob/master/servant-client/CHANGELOG.md)
[Changelog for `servant` package contains significant entries for all core packages.](https://github.com/haskell-servant/servant/blob/master/servant/CHANGELOG.md)

0.15
----

- Streaming refactoring.
[#991](https://github.com/haskell-servant/servant/pull/991)
[#1076](https://github.com/haskell-servant/servant/pull/1076)
[#1077](https://github.com/haskell-servant/servant/pull/1077)

The streaming functionality (`Servant.API.Stream`) is refactored to use
`servant`'s own `SourceIO` type (see `Servant.Types.SourceT` documentation),
which replaces both `StreamGenerator` and `ResultStream` types.

New conversion type-classes are `ToSourceIO` and `FromSourceIO`
(replacing `ToStreamGenerator` and `BuildFromStream`).
There are instances for *conduit*, *pipes* and *machines* in new packages:
[servant-conduit](https://hackage.haskell.org/package/servant-conduit)
[servant-pipes](https://hackage.haskell.org/package/servant-pipes) and
[servant-machines](https://hackage.haskell.org/package/servant-machines)
respectively.

Writing new framing strategies is simpler. Check existing strategies for examples.

This change shouldn't affect you, if you don't use streaming endpoints.

- *servant-client* Separate streaming client.
[#1066](https://github.com/haskell-servant/servant/pull/1066)

We now have two `http-client` based clients,
in `Servant.Client` and `Servant.Client.Streaming`.

Their API is the same, except for
- `Servant.Client` **cannot** request `Stream` endpoints.
- `Servant.Client` is *run* by direct
`runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a)`
- `Servant.Client.Streaming` **can** request `Stream` endpoints.
- `Servant.Client.Streaming` is *used* by CPSised
`withClientM :: ClientM a -> ClientEnv -> (Either ServantError a -> IO b) -> IO b`

To access `Stream` endpoints use `Servant.Client.Streaming` with
`withClientM`; otherwise you can continue using `Servant.Client` with `runClientM`.
You can use both too, `ClientEnv` and `BaseUrl` types are same for both.

**Note:** `Servant.Client.Streaming` doesn't *stream* non-`Stream` endpoints.
Requesting ordinary `Verb` endpoints (e.g. `Get`) will block until
the whole response is received.

There is `Servant.Client.Streaming.runClientM` function, but it has
restricted type. `NFData a` constraint prevents using it with
`SourceT`, `Conduit` etc. response types.

```haskell
runClientM :: NFData a => ClientM a -> ClientEnv -> IO (Either ServantError a)
```

This change shouldn't affect you, if you don't use streaming endpoints.

- Drop support for GHC older than 8.0
[#1008](https://github.com/haskell-servant/servant/pull/1008)
[#1009](https://github.com/haskell-servant/servant/pull/1009)

- *servant-client-core* Add `NFData (GenResponse a)` and `NFData ServantError` instances.
[#1076](https://github.com/haskell-servant/servant/pull/1076)

*servant-client-core* Add `aeson` and `Lift BaseUrl` instances
[#1037](https://github.com/haskell-servant/servant/pull/1037)

0.14
----

Expand Down
2 changes: 1 addition & 1 deletion servant-client/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2016, Zalora South East Asia Pte Ltd, Servant Contributors
Copyright (c) 2014-2016, Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors

All rights reserved.

Expand Down
26 changes: 15 additions & 11 deletions servant-client/servant-client.cabal
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
cabal-version: >=1.10
name: servant-client
version: 0.15
synopsis: automatical derivation of querying functions for servant webservices

synopsis: Automatic derivation of querying functions for servant
category: Servant, Web
description:
This library lets you derive automatically Haskell functions that
let you query each endpoint of a <http://hackage.haskell.org/package/servant servant> webservice.
.
See <http://haskell-servant.readthedocs.org/en/stable/tutorial/Client.html the client section of the tutorial>.
.
<https://github.com/haskell-servant/servant/blob/master/servant-client/CHANGELOG.md CHANGELOG>

homepage: http://haskell-servant.readthedocs.org/
bug-reports: http://github.com/haskell-servant/servant/issues
license: BSD3
license-file: LICENSE
author: Servant Contributors
maintainer: haskell-servant-maintainers@googlegroups.com
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2017 Servant Contributors
category: Servant, Web
copyright: 2014-2016 Zalora South East Asia Pte Ltd, 2016-2018 Servant Contributors
build-type: Simple
cabal-version: >=1.10
tested-with:
GHC==8.0.2
GHC==8.2.2
GHC==8.4.4
GHC==8.6.2
homepage: http://haskell-servant.readthedocs.org/
Bug-reports: http://github.com/haskell-servant/servant/issues
GHC ==8.0.2
|| ==8.2.2
|| ==8.4.4
|| ==8.6.2

extra-source-files:
CHANGELOG.md
README.md

source-repository head
type: git
location: http://github.com/haskell-servant/servant.git
Expand Down Expand Up @@ -54,7 +58,7 @@ library
-- Strict dependency on `servant-client-core` as we re-export things.
build-depends:
servant == 0.15.*
, servant-client-core == 0.15
, servant-client-core >= 0.15 && <0.15.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.
Expand Down
5 changes: 0 additions & 5 deletions servant-client/tinc.yaml

This file was deleted.

0 comments on commit e3e5d2b

Please sign in to comment.