From c7bae27f009ccaae4d365dc2471c0725de2f5793 Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Thu, 24 Mar 2022 10:58:13 +0100 Subject: Support aeson 2.0 As per the aeson 2.0.0.0 changelog[1], starting with that version the map type used by Object is now abstract, as is the key type of that map. Related: https://github.com/haskell/aeson/pull/866 Related: https://github.com/haskell/aeson/pull/868 [1]: https://hackage.haskell.org/package/aeson-2.0.0.0/changelog --- debug-me.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debug-me.cabal') diff --git a/debug-me.cabal b/debug-me.cabal index d859cbb..db7cc63 100644 --- a/debug-me.cabal +++ b/debug-me.cabal @@ -64,7 +64,7 @@ Executable debug-me , stm-chans (>= 3.0) , posix-pty (>= 0.2.1) , terminal-size (>= 0.3) - , aeson (>= 0.11 && < 1.5) + , aeson (>= 0.11 && < 2.1) , sandi (>= 0.4) , text (>= 1.2.2) , optparse-applicative (>= 0.12) -- cgit v1.2.3 From d007b5beddd398f380494403378e5f4c102592f5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 24 Mar 2022 12:27:02 -0400 Subject: use withPingThread to avoid build warning forkPingThread is deprecated. Also, websockets-0.9 did not include forkPingThread so the old dep was wrong. --- WebSockets.hs | 18 +++++++++--------- debug-me.cabal | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'debug-me.cabal') diff --git a/WebSockets.hs b/WebSockets.hs index 7a53c8c..8aec057 100644 --- a/WebSockets.hs +++ b/WebSockets.hs @@ -164,16 +164,16 @@ clientApp -> (AnyMessage -> Maybe received) -> (TMChan sent -> TMChan (MissingHashes received) -> SessionID -> IO a) -> ClientApp a -clientApp mode mksent filterreceived a conn = do +clientApp mode mksent filterreceived a conn = -- Ping every 30 seconds to avoid timeouts caused by proxies etc. - forkPingThread conn 30 - _v <- negotiateWireVersion conn - sendBinaryData conn (SelectMode ClientSends mode) - r <- receiveData conn - case r of - Ready ServerSends sid -> bracket setup cleanup (go sid) - WireProtocolError e -> error e - _ -> protocolError conn "Did not get expected Ready message from server" + withPingThread conn 30 (return ()) $ do + _v <- negotiateWireVersion conn + sendBinaryData conn (SelectMode ClientSends mode) + r <- receiveData conn + case r of + Ready ServerSends sid -> bracket setup cleanup (go sid) + WireProtocolError e -> error e + _ -> protocolError conn "Did not get expected Ready message from server" where setup = do schan <- newTMChanIO diff --git a/debug-me.cabal b/debug-me.cabal index db7cc63..d5a44e9 100644 --- a/debug-me.cabal +++ b/debug-me.cabal @@ -1,5 +1,5 @@ Name: debug-me -Version: 1.20200820 +Version: 1.20220324 Cabal-Version: >= 1.10 Maintainer: Joey Hess Author: Joey Hess @@ -81,7 +81,7 @@ Executable debug-me , http-types (>= 0.9) , http-client (>= 0.4) , http-client-tls (>= 0.2) - , websockets (>= 0.9) + , websockets (>= 0.12.6.0) , wai-websockets (>= 3.0) , uuid (>= 1.3) , protobuf (>= 0.2) -- cgit v1.2.3