om-legion 6.9.0.3 → 6.9.0.4
raw patch · 6 files changed
+55/−49 lines, 6 filesdep ~aesondep ~asyncdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: aeson, async, base, binary, bytestring, clock, conduit, containers, crdt-event-fold, hspec, http-api-data, lens, lens-aeson, monad-logger, mtl, mustache, network, om-fork, om-kubernetes, om-logging, om-show, om-socket, om-time, safe, safe-exceptions, stm, template-haskell, text, time, transformers, unix, unliftio, unliftio-core, vector
API changes (from Hackage documentation)
- OM.Legion: type EventConstraints e = (Binary (Output e), Binary (State e), Binary e, Default (State e), Eq (Output e), Eq e, Event Peer e, Show (Output e), Show (State e), Show e, ToJSON (Output e), ToJSON (State e), ToJSON e)
+ OM.Legion: type EventConstraints e = (Binary Output e, Binary State e, Binary e, Default State e, Eq Output e, Eq e, Event Peer e, Show Output e, Show State e, Show e, ToJSON Output e, ToJSON State e, ToJSON e)
- OM.Legion: type MonadConstraints m = (MonadCatch m, MonadFail m, MonadLoggerIO m, MonadTimeSpec m, MonadUnliftIO m, Race)
+ OM.Legion: type MonadConstraints (m :: Type -> Type) = (MonadCatch m, MonadFail m, MonadLoggerIO m, MonadTimeSpec m, MonadUnliftIO m, Race)
Files
- om-legion.cabal +38/−38
- src/OM/Legion/Connection.hs +6/−5
- src/OM/Legion/Runtime.hs +0/−4
- test/om-legion-test-driver.hs +5/−1
- test/om-legion-test-node.hs +4/−1
- test/om-legion-test-stable.hs +2/−0
om-legion.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: om-legion-version: 6.9.0.3+version: 6.9.0.4 synopsis: Legion Framework. description: Framework for managing shared, replicated state across a number of homogeneous nodes.@@ -19,33 +19,33 @@ common dependencies build-depends:- , aeson >= 2.0.3.0 && < 2.1- , async >= 2.2.4 && < 2.3- , base >= 4.15.0.0 && < 4.16- , binary >= 0.8.8.0 && < 0.9- , bytestring >= 0.10.12.1 && < 0.11- , clock >= 0.8.3 && < 0.9- , conduit >= 1.3.4.2 && < 1.4- , containers >= 0.6.4.1 && < 0.7- , crdt-event-fold >= 1.8.0.0 && < 1.9- , data-default-class >= 0.1.2.0 && < 0.2- , http-api-data >= 0.4.3 && < 0.5- , monad-logger >= 0.3.36 && < 0.4- , mtl >= 2.2.2 && < 2.3- , network >= 3.1.2.7 && < 3.2- , om-fork >= 0.7.1.3 && < 0.8- , om-logging >= 1.1.0.1 && < 1.2- , om-show >= 0.1.2.1 && < 0.2- , om-socket >= 0.11.0.1 && < 0.12- , om-time >= 0.3.0.0 && < 0.4- , random-shuffle >= 0.0.4 && < 0.1- , safe-exceptions >= 0.1.7.3 && < 0.2- , stm >= 2.5.0.0 && < 2.6- , text >= 1.2.5.0 && < 1.3- , time >= 1.9.3 && < 1.10- , transformers >= 0.5.6.2 && < 0.6- , unliftio-core >= 0.2.0.1 && < 0.3- , uuid >= 1.3.15 && < 1.4+ , aeson >= 2.2.1.0 && < 2.3+ , async >= 2.2.5 && < 2.3+ , base >= 4.19.0.0 && < 4.20+ , binary >= 0.8.9.1 && < 0.9+ , bytestring >= 0.12.0.2 && < 0.13+ , clock >= 0.8.4 && < 0.9+ , conduit >= 1.3.5 && < 1.4+ , containers >= 0.6.8 && < 0.7+ , crdt-event-fold >= 1.8.0.2 && < 1.9+ , data-default-class >= 0.1.2.0 && < 0.2+ , http-api-data >= 0.6 && < 0.7+ , monad-logger >= 0.3.40 && < 0.4+ , mtl >= 2.3.1 && < 2.4+ , network >= 3.1.4.0 && < 3.2+ , om-fork >= 0.7.1.9 && < 0.8+ , om-logging >= 1.1.0.8 && < 1.2+ , om-show >= 0.1.2.9 && < 0.2+ , om-socket >= 0.11.0.5 && < 0.12+ , om-time >= 0.3.0.4 && < 0.4+ , random-shuffle >= 0.0.4 && < 0.1+ , safe-exceptions >= 0.1.7.4 && < 0.2+ , stm >= 2.5.2.1 && < 2.6+ , text >= 2.1 && < 2.2+ , time >= 1.12.2 && < 1.13+ , transformers >= 0.6.1.0 && < 0.7+ , unliftio-core >= 0.2.1.0 && < 0.3+ , uuid >= 1.3.15 && < 1.4 common warnings ghc-options:@@ -73,16 +73,16 @@ , om-legion , hostname >= 1.0 && < 1.1- , hspec >= 2.8.5 && < 2.9- , lens >= 5.0.1 && < 5.1- , lens-aeson >= 1.1.3 && < 1.2- , mustache >= 2.4.1 && < 2.5- , om-kubernetes >= 2.3.1.3 && < 2.4- , safe >= 0.3.19 && < 0.4- , template-haskell >= 2.17.0.0 && < 2.18- , unix >= 2.7.2.2 && < 2.8- , unliftio >= 0.2.22.0 && < 0.3- , vector >= 0.12.3.1 && < 0.13+ , hspec >= 2.11.7 && < 2.12+ , lens >= 5.2.3 && < 5.3+ , lens-aeson >= 1.2.3 && < 1.3+ , mustache >= 2.4.2 && < 2.5+ , om-kubernetes >= 2.3.1.8 && < 2.4+ , safe >= 0.3.20 && < 0.4+ , template-haskell >= 2.21.0.0 && < 2.22+ , unix >= 2.8.5.0 && < 2.9+ , unliftio >= 0.2.25.0 && < 0.3+ , vector >= 0.13.1.0 && < 0.14 executable om-legion-test-node import: warnings, dependencies, test-dependencies
src/OM/Legion/Connection.hs view
@@ -21,7 +21,7 @@ ) where import Control.Concurrent.Async (async)-import Control.Exception.Safe (MonadCatch, finally, tryAny)+import Control.Exception.Safe (finally, tryAny) import Control.Monad (void) import Control.Monad.IO.Class (MonadIO(liftIO)) import Control.Monad.Logger.CallStack (LoggingT(runLoggingT),@@ -41,6 +41,9 @@ PeerMessage, close, enqueueMsg, newMsgChan, stream) import OM.Show (showt) import OM.Socket (AddressDescription(AddressDescription), openEgress)+import Prelude (Applicative(pure), Bool(False, True), Either(Left,+ Right), Maybe(Just, Nothing), Monad((>>=)), Semigroup((<>)), ($),+ (.), Eq, IO, Show) import System.Clock (TimeSpec) import qualified Data.Map as Map @@ -62,7 +65,6 @@ createConnection :: forall m e. ( EventConstraints e- , MonadCatch m , MonadLoggerIO m , MonadState (RuntimeState e) m )@@ -83,7 +85,7 @@ <> ":" <> showt peerMessagePort ) in- finally + finally ( (tryAny . runConduit) ( stream rsSelf msgChan@@ -95,7 +97,7 @@ Right () -> logInfo "Disconnecting because source dried up." ) (close msgChan)- + let conn :: Connection e conn = Connection (enqueueMsg msgChan)@@ -205,7 +207,6 @@ sendPeer :: forall m e. ( EventConstraints e- , MonadCatch m , MonadLoggerIO m , MonadState (RuntimeState e) m )
src/OM/Legion/Runtime.hs view
@@ -514,7 +514,6 @@ , Eq (Output e) , Eq e , Event Peer e- , MonadCatch m , MonadLoggerIO m , MonadTimeSpec m , Show (Output e)@@ -716,7 +715,6 @@ -} updateCluster :: ( EventConstraints e- , MonadCatch m , MonadLoggerIO m , MonadState (RuntimeState e) m )@@ -735,7 +733,6 @@ updateClusterAs :: forall e m a. ( EventConstraints e- , MonadCatch m , MonadLoggerIO m , MonadState (RuntimeState e) m )@@ -801,7 +798,6 @@ {- | Propagates cluster information if necessary. -} propagate :: ( EventConstraints e- , MonadCatch m , MonadLoggerIO m , MonadState (RuntimeState e) m )
test/om-legion-test-driver.hs view
@@ -26,12 +26,16 @@ LevelInfo, LevelOther, LevelWarn), LoggingT(runLoggingT), MonadLogger, MonadLoggerIO, logDebug, logError, logInfo) import Data.Aeson (Value, eitherDecode)-import Data.Aeson.Lens (AsPrimitive(_String), AsValue(_Array), key)+import Data.Aeson.Lens (AsValue(_Array, _String), key) import Data.Foldable (for_) import Data.String (IsString(fromString)) import OM.Fork (Race, runRace) import OM.Logging (standardLogging) import OM.Show (showt)+import Prelude (Applicative((<*>), pure), Bool(False, True), Either(Left,+ Right), Eq((==)), Foldable(foldl, null), Maybe(Just, Nothing),+ Monad((>>=)), MonadFail(fail), Num((-)), Semigroup((<>)), Show(show),+ ($), (&&), (.), (<$>), IO, Int, String, flip, id, not) import System.Console.GetOpt (ArgDescr(OptArg, ReqArg), ArgOrder(Permute), OptDescr(Option), getOpt, usageInfo) import System.Environment (getArgs)
test/om-legion-test-node.hs view
@@ -20,7 +20,7 @@ import Control.Monad.IO.Class (MonadIO(liftIO)) import Control.Monad.Logger.CallStack (LoggingT(runLoggingT), MonadLogger, logDebug)-import Data.Aeson.Lens (AsPrimitive(_String), AsValue(_Array), key)+import Data.Aeson.Lens (AsValue(_Array, _String), key) import Data.String (IsString(fromString)) import Network.HostName (HostName, getHostName) import OM.Fork (race, runRace, wait)@@ -32,6 +32,9 @@ withStandardFormat) import OM.Show (showt) import OM.Socket (openServer)+import Prelude (Applicative(pure), Eq((==)), Maybe(Nothing), Monad((>>=)),+ Num((+)), Semigroup((<>)), ($), (&&), (.), (<$>), (=<<), Bool, IO,+ filter, flip, fromIntegral, not) import System.Environment (getEnv) import System.Exit (ExitCode(ExitFailure)) import System.IO (IOMode(WriteMode), withFile)
test/om-legion-test-stable.hs view
@@ -1,5 +1,7 @@ {-# LANGUAGE NumericUnderscores #-} +{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}+ {- | Description: "Scale up" test driver. -} module Main (main) where