From bccf7ac97a8a4d821fe199cab530ec3d37c6c653 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Wed, 5 Nov 2025 23:32:30 +0500 Subject: [PATCH] Revert "chore: remove unused haskell dependencies" This reverts commit b6bb8382e7a85ed4c5cba1148c0503dca83609b3. --- postgrest.cabal | 18 +++++++++++++++--- stack.yaml | 1 + stack.yaml.lock | 7 +++++++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/postgrest.cabal b/postgrest.cabal index a6448ff75..abe578596 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -102,8 +102,10 @@ library , auto-update >= 0.1.4 && < 0.3 , base64-bytestring >= 1 && < 1.3 , bytestring >= 0.10.8 && < 0.13 + , cache >= 0.1.3 && < 0.2.0 , case-insensitive >= 1.2 && < 1.3 , cassava >= 0.4.5 && < 0.6 + , clock >= 0.8.3 && < 0.9.0 , configurator-pg >= 0.2.11 && < 0.3 , containers >= 0.5.7 && < 0.7 , cookie >= 0.4.2 && < 0.6 @@ -116,9 +118,11 @@ library , hasql-notifications >= 0.2.2.2 && < 0.2.3 , hasql-pool >= 1.0.1 && < 1.1 , hasql-transaction >= 1.0.1 && < 1.2 + , heredoc >= 0.2 && < 0.3 , http-client >= 0.7.19 && < 0.8 , http-types >= 0.12.2 && < 0.13 , insert-ordered-containers >= 0.2.2 && < 0.3 + , iproute >= 1.7.0 && < 1.8 , jose-jwt >= 0.9.6 && < 0.11 , lens >= 4.14 && < 5.4 , lens-aeson >= 1.0.1 && < 1.3 @@ -128,6 +132,8 @@ library , network-uri >= 2.6.1 && < 2.8 , optparse-applicative >= 0.13 && < 0.19 , parsec >= 3.1.11 && < 3.2 + -- Technically unused, can be removed after updating to hasql >= 1.7 + , postgresql-libpq >= 0.10 , prometheus-client >= 1.1.1 && < 1.2.0 , protolude >= 0.3.1 && < 0.4 , regex-tdfa >= 1.2.2 && < 1.4 @@ -145,6 +151,11 @@ library , wai >= 3.2.1 && < 3.3 , wai-cors >= 0.2.5 && < 0.3 , wai-extra >= 3.1.8 && < 3.2 + -- We already depend on wai-logger >= 2.3.7 indirectly via wai-extra, + -- but we want to depend on 2.4.0 which fixes 'unknownSocket' log output + -- for unix sockets; this is tested in test/io/test_io.py. See + -- https://github.com/kazu-yamamoto/logger/commit/3a71ca70afdbb93d4ecf0083eeba1fbbbcab3fc3 + , wai-logger >= 2.4.0 , warp >= 3.3.19 && < 3.5 , stm >= 2.5 && < 3 , stm-hamt >= 1.2 && < 2 @@ -155,7 +166,7 @@ library -- -optP-Wno-nonportable-include-path -- prevents build failures on case-insensitive filesystems (macos), -- see https://github.com/commercialhaskell/stack/issues/3918 - ghc-options: -Werror -Wall -fwarn-identities -Wunused-packages + ghc-options: -Werror -Wall -fwarn-identities -fno-spec-constr -optP-Wno-nonportable-include-path if flag(dev) @@ -176,10 +187,11 @@ executable postgrest hs-source-dirs: main main-is: Main.hs build-depends: base >= 4.9 && < 4.20 + , containers >= 0.5.7 && < 0.7 , postgrest , protolude >= 0.3.1 && < 0.4 ghc-options: -threaded -rtsopts "-with-rtsopts=-N -I0 -qg" - -O2 -Werror -Wall -fwarn-identities -Wunused-packages + -O2 -Werror -Wall -fwarn-identities -fno-spec-constr -optP-Wno-nonportable-include-path if flag(dev) @@ -279,7 +291,7 @@ test-suite spec , transformers-base >= 0.4.4 && < 0.5 , wai >= 3.2.1 && < 3.3 , wai-extra >= 3.0.19 && < 3.2 - ghc-options: -threaded -O0 -Werror -Wall -fwarn-identities -Wunused-packages + ghc-options: -threaded -O0 -Werror -Wall -fwarn-identities -fno-spec-constr -optP-Wno-nonportable-include-path -fno-warn-missing-signatures -fwrite-ide-info diff --git a/stack.yaml b/stack.yaml index 7037b57ad..f6db01a22 100644 --- a/stack.yaml +++ b/stack.yaml @@ -13,4 +13,5 @@ extra-deps: - fuzzyset-0.2.4 - hasql-pool-1.0.1 - jose-jwt-0.10.0 + - postgresql-libpq-0.10.1.0 - streaming-commons-0.2.3.1 diff --git a/stack.yaml.lock b/stack.yaml.lock index 670f75002..b3d989f1d 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -32,6 +32,13 @@ packages: size: 1231 original: hackage: jose-jwt-0.10.0 +- completed: + hackage: postgresql-libpq-0.10.1.0@sha256:6b580c9d5068e78eecc13e655b2885c8e79cdacfca513c5d1e5a6b9dc61d9758,3166 + pantry-tree: + sha256: ae81e7628a8f3d1ef33ace71fa0845c073c003ca7f1150cc9d9ba1e55fc84236 + size: 1096 + original: + hackage: postgresql-libpq-0.10.1.0 - completed: hackage: streaming-commons-0.2.3.1@sha256:ed7999fea9e912b1211ea93d7e20a7998bf4753166370c94048885650f303bf0,4841 pantry-tree: