diff --git a/.circleci/config.yml b/.circleci/config.yml index 70380e5..2c78b42 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 jobs: publish: docker: - - image: fpco/stack-build-small:lts-14 + - image: fpco/stack-build-small:lts-16.11 steps: - attach_workspace: at: ws @@ -30,7 +30,7 @@ jobs: build-test: docker: - - image: fpco/stack-build:lts-14.27 + - image: fpco/stack-build:lts-16.11 - image: postgres:11-alpine environment: POSTGRES_DB: postgres_ws_test diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ce3367..3030fda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 0.10.0.1 + +- Upgrade stackage to LTS 16.11. Recompiled with GHC 8.8.3. +- Upgrade Alpine base docker image to Alpine 3.12 + ## 0.10.0.0 - Add `PGWS_META_CHANNEL` to configure optional metadata channel to send events from the server. Initially the oply event is `ConnectionOpen`. diff --git a/Dockerfile b/Dockerfile index de14f92..b27f027 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use Alpine Linux as base image -FROM alpine:3.11.6 +FROM alpine:3.12 # Install libpq and gmp dependencies (dynamic libraries required by the project) RUN apk update && apk add libpq gmp libffi diff --git a/Dockerfile.build b/Dockerfile.build index 170bb3a..12b5cff 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,11 +1,11 @@ -FROM alpine:3.11.6 - -RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories -RUN apk -U add shadow@testing +FROM alpine:3.12 RUN apk add --update ca-certificates openssl && update-ca-certificates RUN apk add ghc alpine-sdk linux-headers postgresql-dev zlib-dev +# Required to keep compatibility with stack (groupadd is required for building) +RUN apk -U add shadow + RUN wget -qO- https://get.haskellstack.org/ | sh RUN stack config set system-ghc --global true diff --git a/dist-newstyle/cache/compiler b/dist-newstyle/cache/compiler new file mode 100644 index 0000000..53b2106 Binary files /dev/null and b/dist-newstyle/cache/compiler differ diff --git a/dist-newstyle/cache/config b/dist-newstyle/cache/config new file mode 100644 index 0000000..2734e63 Binary files /dev/null and b/dist-newstyle/cache/config differ diff --git a/postgres-websockets.cabal b/postgres-websockets.cabal index 9a854ec..1bb241f 100644 --- a/postgres-websockets.cabal +++ b/postgres-websockets.cabal @@ -1,7 +1,7 @@ name: postgres-websockets -version: 0.10.0.0 +version: 0.10.0.1 synopsis: Middleware to map LISTEN/NOTIFY messages to Websockets -description: Please see README.md +description: WAI middleware that adds websockets capabilites on top of PostgreSQL's asynchronous notifications using LISTEN and NOTIFY commands. Fully functioning server included. homepage: https://github.com/diogob/postgres-websockets#readme license: BSD3 license-file: LICENSE @@ -48,7 +48,7 @@ library , stm >= 2.5.0.0 && < 2.6 , retry >= 0.8.1.0 && < 0.9 , stringsearch >= 0.3.6.6 && < 0.4 - , time >= 1.8.0.2 && < 1.9 + , time >= 1.8.0.2 && < 1.10 , contravariant >= 1.5.2 && < 1.6 , alarmclock >= 0.7.0.2 && < 0.8 , async >= 2.2.0 && < 2.3 @@ -86,20 +86,20 @@ test-suite postgres-websockets-test , protolude >= 0.2.3 && < 0.3 , postgres-websockets , hspec >= 2.7.1 && < 2.8 - , hspec-wai >= 0.9.2 && < 0.10 - , hspec-wai-json >= 0.9.2 && < 0.10 + , hspec-wai >= 0.9.2 && < 0.11 + , hspec-wai-json >= 0.9.2 && < 0.11 , aeson >= 1.4.6.0 && < 1.5 , hasql >= 0.19 , hasql-pool >= 0.4 , hasql-notifications >= 0.1.0.0 && < 0.2 , http-types >= 0.9 - , time >= 1.8.0.2 && < 1.9 + , time >= 1.8.0.2 && < 1.10 , unordered-containers >= 0.2 , wai-extra >= 3.0.29 && < 3.1 , stm >= 2.5.0.0 && < 2.6 , websockets >= 0.12.7.0 && < 0.13 - , network >= 2.8.0.1 && < 2.9 - , lens >= 4.17.1 && < 4.18 + , network >= 2.8.0.1 && < 3.2 + , lens >= 4.17.1 && < 4.19 , lens-aeson ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N default-language: Haskell2010 diff --git a/stack.yaml b/stack.yaml index 368e7b8..51530a7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,10 +1,11 @@ -resolver: lts-14.27 +resolver: lts-16.11 extra-deps: - envparse-0.4.1@sha256:989902e6368532548f61de1fa245ad2b39176cddd8743b20071af519a709ce30 -- stm-containers-1.1.0.2@sha256:8976df591e61f378ef29dc0443dbe2d5d34818c898093af3ca138ea1d013b5eb -- stm-hamt-1.2.0.2@sha256:18126db7bf2d9c967a6020c677b3005dd957a4c39d69aeaea3c29c90de8f6124 -- primitive-extras-0.7.1@sha256:23905c57089418b1a2d324cfee3e81bbd5a344a0fa56a827867b2dce275fdb5e - hasql-notifications-0.1.0.0@sha256:9ab112d2bb5da0d55abd65f0d27a7bb1dc4aeb792518d9a2ea8a16e243e19985,2156 +- stm-containers-1.1.0.4@sha256:f83a683357b6e3b1dda3e70d2077a37224ed534df1f74c4e11f3f6daa7945c5b,3248 +- stm-hamt-1.2.0.4@sha256:7957497c022554b7599e790696d1a3e56359ad99e5da36a251894c626ca1f60a,3970 +- primitive-extras-0.8@sha256:fca0310150496867f5b9421fe1541ecda87fae17eae44885a29f9c52dd00c8ff,2963 +- primitive-unlifted-0.1.3.0@sha256:a98f827740f5dcf097d885b3a47c32f4462204449620abc9d51b8c4f8619f9e6,1427 ghc-options: postgres-websockets: -Wall -fwarn-identities -fno-warn-redundant-constraints diff --git a/stack.yaml.lock b/stack.yaml.lock index 2ab8691..9461191 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -12,36 +12,43 @@ packages: original: hackage: envparse-0.4.1@sha256:989902e6368532548f61de1fa245ad2b39176cddd8743b20071af519a709ce30 - completed: - hackage: stm-containers-1.1.0.2@sha256:8976df591e61f378ef29dc0443dbe2d5d34818c898093af3ca138ea1d013b5eb,3210 + hackage: hasql-notifications-0.1.0.0@sha256:9ab112d2bb5da0d55abd65f0d27a7bb1dc4aeb792518d9a2ea8a16e243e19985,2156 pantry-tree: - size: 697 - sha256: 61e041a97aa230e874a50cdea4ded5f264fbb6337811cf4adf4cadd51176a084 + size: 452 + sha256: 3f5c51ec2bc7b58b5b6e8c871c8ed903a8dd1fbbb37cce9607407933d678e205 original: - hackage: stm-containers-1.1.0.2@sha256:8976df591e61f378ef29dc0443dbe2d5d34818c898093af3ca138ea1d013b5eb + hackage: hasql-notifications-0.1.0.0@sha256:9ab112d2bb5da0d55abd65f0d27a7bb1dc4aeb792518d9a2ea8a16e243e19985,2156 - completed: - hackage: stm-hamt-1.2.0.2@sha256:18126db7bf2d9c967a6020c677b3005dd957a4c39d69aeaea3c29c90de8f6124,3972 + hackage: stm-containers-1.1.0.4@sha256:f83a683357b6e3b1dda3e70d2077a37224ed534df1f74c4e11f3f6daa7945c5b,3248 + pantry-tree: + size: 761 + sha256: 059c5a2d657d392aca0a887648f57380d6321734dc8879c056a44d4414308ac6 + original: + hackage: stm-containers-1.1.0.4@sha256:f83a683357b6e3b1dda3e70d2077a37224ed534df1f74c4e11f3f6daa7945c5b,3248 +- completed: + hackage: stm-hamt-1.2.0.4@sha256:7957497c022554b7599e790696d1a3e56359ad99e5da36a251894c626ca1f60a,3970 pantry-tree: size: 1009 - sha256: ef426797655d6b4b9238b1200c4129d44e91f996f26b92a035b1333b8b8a6f62 + sha256: d9a8be48da86bd4a2ba9d52ea29b9a74f1b686d439ba1bbfba04ab1a002391da original: - hackage: stm-hamt-1.2.0.2@sha256:18126db7bf2d9c967a6020c677b3005dd957a4c39d69aeaea3c29c90de8f6124 + hackage: stm-hamt-1.2.0.4@sha256:7957497c022554b7599e790696d1a3e56359ad99e5da36a251894c626ca1f60a,3970 - completed: - hackage: primitive-extras-0.7.1@sha256:23905c57089418b1a2d324cfee3e81bbd5a344a0fa56a827867b2dce275fdb5e,2945 + hackage: primitive-extras-0.8@sha256:fca0310150496867f5b9421fe1541ecda87fae17eae44885a29f9c52dd00c8ff,2963 pantry-tree: - size: 1181 - sha256: f788dae21ca4f0d0377d97a5ba7fd008d4b0af8991a745f94c29f2caa11dc6bd + size: 1105 + sha256: e7c1d26202b80d1fca2ef780ec7fe76ede1275f4d9a996c6d44c08d8de1c45db original: - hackage: primitive-extras-0.7.1@sha256:23905c57089418b1a2d324cfee3e81bbd5a344a0fa56a827867b2dce275fdb5e + hackage: primitive-extras-0.8@sha256:fca0310150496867f5b9421fe1541ecda87fae17eae44885a29f9c52dd00c8ff,2963 - completed: - hackage: hasql-notifications-0.1.0.0@sha256:9ab112d2bb5da0d55abd65f0d27a7bb1dc4aeb792518d9a2ea8a16e243e19985,2156 + hackage: primitive-unlifted-0.1.3.0@sha256:a98f827740f5dcf097d885b3a47c32f4462204449620abc9d51b8c4f8619f9e6,1427 pantry-tree: - size: 452 - sha256: 3f5c51ec2bc7b58b5b6e8c871c8ed903a8dd1fbbb37cce9607407933d678e205 + size: 420 + sha256: c882dca2a96b98d02b0d21875b651edb11ac67d90e736c0de7a92c410a19eb7f original: - hackage: hasql-notifications-0.1.0.0@sha256:9ab112d2bb5da0d55abd65f0d27a7bb1dc4aeb792518d9a2ea8a16e243e19985,2156 + hackage: primitive-unlifted-0.1.3.0@sha256:a98f827740f5dcf097d885b3a47c32f4462204449620abc9d51b8c4f8619f9e6,1427 snapshots: - completed: - size: 524996 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/27.yaml - sha256: 7ea31a280c56bf36ff591a7397cc384d0dff622e7f9e4225b47d8980f019a0f0 - original: lts-14.27 + size: 532381 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/16/11.yaml + sha256: 1f43c4ad661a114a4f9dd4580988f30da1208d844c097714f5867c52a02e0aa1 + original: lts-16.11