Skip to content

Commit

Permalink
breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
neduard committed Jun 25, 2024
1 parent 8ef3243 commit 33be385
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
3 changes: 2 additions & 1 deletion contrib/cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
packages:
../fuzzyfind
codebase2/codebase
codebase2/codebase-sqlite
codebase2/codebase-sqlite-hashing-v2
Expand Down Expand Up @@ -50,7 +51,7 @@ source-repository-package
constraints:
fsnotify < 0.4,
crypton-x509-store <= 1.6.8,
servant <= 0.19.1,
servant <= 0.20.1,
optparse-applicative <= 0.17.1.0

-- For now there is no way to apply ghc-options for all local packages
Expand Down
4 changes: 2 additions & 2 deletions lib/unison-sqlite/src/Unison/Sqlite/Connection.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ execute conn@(Connection _ _ conn0) sql@(Sql s params) = do
--
-- This function does not support parameters, and is mostly useful for executing DDL and migrations.
executeStatements :: Connection -> Text -> IO ()
executeStatements conn@(Connection _ _ (Sqlite.Connection database)) sql = do
executeStatements conn@(Connection _ _ connection) sql = do
logQuery (Sql sql []) Nothing
Direct.Sqlite.exec database sql `catch` \(exception :: Sqlite.SQLError) ->
Direct.Sqlite.exec (Sqlite.connectionHandle connection) sql `catch` \(exception :: Sqlite.SQLError) ->
throwSqliteQueryException
SqliteQueryExceptionInfo
{ connection = conn,
Expand Down
1 change: 0 additions & 1 deletion parser-typechecker/src/Unison/Runtime/MCode.hs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ module Unison.Runtime.MCode
)
where

import Control.Applicative (liftA2)
import Data.Bifunctor (bimap, first)
import Data.Bits (shiftL, shiftR, (.|.))
import Data.Coerce
Expand Down
1 change: 0 additions & 1 deletion parser-typechecker/src/Unison/Runtime/Serialize.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

module Unison.Runtime.Serialize where

import Control.Applicative (liftA2)
import Control.Monad (replicateM)
import Data.Bits (Bits)
import Data.ByteString qualified as B
Expand Down
7 changes: 3 additions & 4 deletions unison-cli/src/Unison/Cli/Share/Projects.hs
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,9 @@ servantClientToCli action = do
let clientEnv :: ClientEnv
clientEnv =
(mkClientEnv httpManager hardCodedBaseUrl)
{ Servant.makeClientRequest = \url request ->
(Servant.defaultMakeClientRequest url request)
{ Http.Client.responseTimeout = Http.Client.responseTimeoutMicro (60 * 1000 * 1000 {- 60s -})
}
{ Servant.makeClientRequest = \url request -> do
defaultRequest <- (Servant.defaultMakeClientRequest url request)
return defaultRequest { Http.Client.responseTimeout = Http.Client.responseTimeoutMicro (60 * 1000 * 1000 {- 60s -}) }
}

liftIO (runClientM action clientEnv)
Expand Down
8 changes: 4 additions & 4 deletions unison-cli/src/Unison/Share/Sync.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,10 +1051,10 @@ httpUploadEntities ::
go f (Auth.AuthenticatedHttpClient httpClient) unisonShareUrl req =
(Servant.mkClientEnv httpClient unisonShareUrl)
{ Servant.makeClientRequest = \url request ->
-- Disable client-side timeouts
(Servant.defaultMakeClientRequest url request)
{ Http.Client.responseTimeout = Http.Client.responseTimeoutNone
}
do
-- Disable client-side timeouts
defaultRequest <- (Servant.defaultMakeClientRequest url request)
return defaultRequest {Http.Client.responseTimeout = Http.Client.responseTimeoutNone}
}
& runReaderT (f req)
& runExceptT
6 changes: 3 additions & 3 deletions unison-cli/unison-cli.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ library
, semialign
, semigroups
, servant
, servant-client
, servant-client >=0.20
, shellmet
, stm
, template-haskell
Expand Down Expand Up @@ -378,7 +378,7 @@ executable transcripts
, semialign
, semigroups
, servant
, servant-client
, servant-client >=0.20
, shellmet
, silently
, stm
Expand Down Expand Up @@ -526,7 +526,7 @@ test-suite cli-tests
, semialign
, semigroups
, servant
, servant-client
, servant-client >=0.20
, shellmet
, stm
, template-haskell
Expand Down

0 comments on commit 33be385

Please sign in to comment.