distributed-process-supervisor 0.2.1 → 0.2.2
raw patch · 7 files changed
+72/−68 lines, 7 filesdep ~basedep ~binarydep ~bytestringsetup-changednew-uploaderPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, binary, bytestring, containers, deepseq, exceptions, hashable, network, network-transport, network-transport-tcp, stm, time
API changes (from Hackage documentation)
- Control.Distributed.Process.Supervisor: ChildSpec :: !ChildKey -> !ChildType -> !RestartPolicy -> !(Maybe TimeInterval) -> !ChildStopPolicy -> !ChildStart -> !(Maybe RegisteredName) -> ChildSpec
+ Control.Distributed.Process.Supervisor: ChildSpec :: !ChildKey -> !ChildType -> !RestartPolicy -> !Maybe TimeInterval -> !ChildStopPolicy -> !ChildStart -> !Maybe RegisteredName -> ChildSpec
- Control.Distributed.Process.Supervisor: CreateHandle :: !(Closure (SupervisorPid -> Process (ChildPid, Message))) -> ChildStart
+ Control.Distributed.Process.Supervisor: CreateHandle :: !Closure (SupervisorPid -> Process (ChildPid, Message)) -> ChildStart
- Control.Distributed.Process.Supervisor: CustomRegister :: !(Closure (ChildPid -> Process ())) -> RegisteredName
+ Control.Distributed.Process.Supervisor: CustomRegister :: !Closure (ChildPid -> Process ()) -> RegisteredName
- Control.Distributed.Process.Supervisor: RunClosure :: !(Closure (Process ())) -> ChildStart
+ Control.Distributed.Process.Supervisor: RunClosure :: !Closure (Process ()) -> ChildStart
- Control.Distributed.Process.Supervisor: [childRegName] :: ChildSpec -> !(Maybe RegisteredName)
+ Control.Distributed.Process.Supervisor: [childRegName] :: ChildSpec -> !Maybe RegisteredName
- Control.Distributed.Process.Supervisor: [childRestartDelay] :: ChildSpec -> !(Maybe TimeInterval)
+ Control.Distributed.Process.Supervisor: [childRestartDelay] :: ChildSpec -> !Maybe TimeInterval
- Control.Distributed.Process.Supervisor: statistics :: Addressable a => a -> Process (SupervisorStats)
+ Control.Distributed.Process.Supervisor: statistics :: Addressable a => a -> Process SupervisorStats
Files
- ChangeLog +5/−0
- Setup.lhs +0/−3
- distributed-process-supervisor.cabal +58/−48
- src/Control/Distributed/Process/Supervisor.hs +1/−4
- src/Control/Distributed/Process/Supervisor/Types.hs +1/−1
- tests/TestSupervisor.hs +1/−4
- tests/TestUtils.hs +6/−8
ChangeLog view
@@ -1,3 +1,8 @@+2024-09-03 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.2.2++* Bumped dependency bounds to support GHC 8.10.7 - GHC 9.10.1+* Updated links to point to Distributed Haskell monorepo+ 2018-06-14 Facundo Domínguez <facundo.dominguez@tweag.io> 0.2.1 * Update dependency bounds.
− Setup.lhs
@@ -1,3 +0,0 @@-#!/usr/bin/env runhaskell-> import Distribution.Simple-> main = defaultMain
distributed-process-supervisor.cabal view
@@ -1,15 +1,15 @@+cabal-version: 3.0 name: distributed-process-supervisor-version: 0.2.1-cabal-version: >=1.8+version: 0.2.2 build-type: Simple-license: BSD3+license: BSD-3-Clause license-file: LICENSE Copyright: Tim Watson 2012 - 2013 Author: Tim Watson-Maintainer: Tim Watson <watson.timothy@gmail.com>+maintainer: The Distributed Haskell team Stability: experimental-Homepage: http://github.com/haskell-distributed/distributed-process-supervisor-Bug-Reports: http://github.com/haskell-distributed/distributed-process-supervisor/issues+Homepage: http://github.com/haskell-distributed/distributed-process+Bug-Reports: http://github.com/haskell-distributed/distributed-process/issues synopsis: Supervisors for The Cloud Haskell Application Platform description: A part of the Cloud Haskell framework @@ -20,47 +20,58 @@ For detailed information see "Control.Distributed.Process.Supervisor" category: Control-tested-with: GHC == 8.2.2-data-dir: ""-extra-source-files: ChangeLog+tested-with: GHC==8.10.7 GHC==9.0.2 GHC==9.2.8 GHC==9.4.5 GHC==9.6.4 GHC==9.8.2 GHC==9.10.1+extra-doc-files: ChangeLog source-repository head- type: git- location: https://github.com/haskell-distributed/distributed-process-supervisor+ Type: git+ Location: https://github.com/haskell-distributed/distributed-process+ SubDir: packages/distributed-process-supervisor +common warnings+ ghc-options: -Wall+ -Wcompat+ -Widentities+ -Wincomplete-uni-patterns+ -Wincomplete-record-updates+ -Wredundant-constraints+ -fhide-source-paths+ -Wpartial-fields+ library+ import: warnings build-depends:- base >= 4.8.2.0 && < 5,- bytestring >= 0.9,+ base >= 4.14 && < 5,+ bytestring >= 0.10, data-accessor >= 0.2.2.3, distributed-static >= 0.3.4.0 && < 0.4, distributed-process >= 0.7.3 && < 0.8, distributed-process-extras >= 0.3.1 && < 0.4, distributed-process-client-server >= 0.2.0 && < 0.4,- binary >= 0.6.3.0 && < 0.9,- deepseq >= 1.3.0.1 && < 1.5,+ binary >= 0.8 && < 0.9,+ deepseq >= 1.4 && < 1.6, mtl,- containers >= 0.4 && < 0.6,- hashable >= 1.2.0.5 && < 1.3,+ containers >= 0.6 && < 0.8,+ hashable >= 1.2.0.5 && < 1.6, unordered-containers >= 0.2.3.0 && < 0.3, fingertree < 0.2,- stm >= 2.4 && < 2.5,- time > 1.4 && < 1.9,+ stm >= 2.4 && < 2.6,+ time > 1.4 && < 1.15, transformers,- exceptions >= 0.8.3 && < 0.11- extensions: CPP+ exceptions >= 0.10 && < 0.11 hs-source-dirs: src- ghc-options: -Wall exposed-modules: Control.Distributed.Process.Supervisor Control.Distributed.Process.Supervisor.Management other-modules: Control.Distributed.Process.Supervisor.Types+ default-language: Haskell2010 test-suite SupervisorTests+ import: warnings type: exitcode-stdio-1.0 build-depends:- base >= 4.8.2.0 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.9, containers, unordered-containers,@@ -75,32 +86,32 @@ random, data-accessor, fingertree < 0.2,- network-transport >= 0.4 && < 0.5.3,+ network-transport >= 0.4 && < 0.6, mtl,- network-transport-tcp >= 0.4 && < 0.7,- binary >= 0.6.3.0 && < 0.9,- deepseq >= 1.3.0.1 && < 1.5,- network >= 2.3 && < 2.7,+ network-transport-tcp >= 0.4 && < 0.9,+ binary >= 0.8 && < 0.9,+ deepseq,+ network >= 2.3 && < 3.3, HUnit >= 1.2 && < 2,- stm >= 2.3 && < 2.5,- time > 1.4 && < 1.9,+ stm,+ time, test-framework >= 0.6 && < 0.9, test-framework-hunit, transformers, rematch >= 0.2.0.0, ghc-prim,- exceptions >= 0.8.3 && < 0.11- hs-source-dirs:- tests- ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-name-shadowing -fno-warn-unused-do-bind -eventlog- extensions: CPP+ exceptions >= 0.10 && < 0.11+ hs-source-dirs: tests+ ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-name-shadowing -fno-warn-unused-do-bind -eventlog main-is: TestSupervisor.hs other-modules: TestUtils+ default-language: Haskell2010 test-suite NonThreadedSupervisorTests+ import: warnings type: exitcode-stdio-1.0 build-depends:- base >= 4.8.2.0 && < 5,+ base >= 4.14 && < 5, ansi-terminal >= 0.5 && < 0.9, containers, unordered-containers,@@ -115,24 +126,23 @@ random, data-accessor, fingertree < 0.2,- network-transport >= 0.4 && < 0.5.3,+ network-transport, mtl,- network-transport-tcp >= 0.4 && < 0.7,- binary >= 0.6.3.0 && < 0.9,- deepseq >= 1.3.0.1 && < 1.5,- network >= 2.3 && < 2.7,+ network-transport-tcp >= 0.4 && < 0.9,+ binary >= 0.8 && < 0.9,+ deepseq,+ network >= 2.3 && < 3.3, HUnit >= 1.2 && < 2,- stm >= 2.3 && < 2.5,- time > 1.4 && < 1.9,+ stm,+ time, test-framework >= 0.6 && < 0.9, test-framework-hunit, transformers, rematch >= 0.2.0.0, ghc-prim,- exceptions >= 0.8.3 && < 0.11- hs-source-dirs:- tests- ghc-options: -Wall -rtsopts -fno-warn-unused-do-bind -fno-warn-name-shadowing- extensions: CPP+ exceptions >= 0.10 && < 0.11+ hs-source-dirs: tests+ ghc-options: -rtsopts -fno-warn-unused-do-bind -fno-warn-name-shadowing main-is: TestSupervisor.hs other-modules: TestUtils+ default-language: Haskell2010
src/Control/Distributed/Process/Supervisor.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-}@@ -413,11 +414,7 @@ ) import Data.Typeable (Typeable) -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch, filter, init, rem)-#else import Prelude hiding (filter, init, rem)-#endif import GHC.Generics
src/Control/Distributed/Process/Supervisor/Types.hs view
@@ -80,7 +80,7 @@ -- | The maximum number of restarts a supervisor will tollerate, created by -- evaluating "maxRestarts". newtype MaxRestarts = MaxR { maxNumberOfRestarts :: Int }- deriving (Typeable, Generic, Show)+ deriving (Typeable, Generic, Show, Eq) instance Binary MaxRestarts where instance Hashable MaxRestarts where instance NFData MaxRestarts where
tests/TestSupervisor.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-}@@ -56,10 +57,6 @@ import Data.ByteString.Lazy (empty) import Data.Maybe (catMaybes)--#if !MIN_VERSION_base(4,6,0)-import Prelude hiding (catch)-#endif import Test.HUnit (Assertion, assertFailure) import Test.Framework (Test, testGroup)
tests/TestUtils.hs view
@@ -1,5 +1,6 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE TupleSections #-}+{-# LANGUAGE TupleSections #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveGeneric #-} @@ -36,9 +37,6 @@ , stash ) where -#if ! MIN_VERSION_base(4,6,0)-import Prelude hiding (catch)-#endif import Control.Concurrent ( ThreadId , myThreadId@@ -124,7 +122,7 @@ mkNode :: String -> IO LocalNode mkNode port = do Right (transport1, _) <-- createTransportExposeInternals "127.0.0.1" port ("127.0.0.1",) defaultTCPParameters+ createTransportExposeInternals (defaultTCPAddr "127.0.0.1" port) defaultTCPParameters newLocalNode transport1 initRemoteTable -- | Run the supplied @testProc@ using an @MVar@ to collect and assert@@ -154,7 +152,8 @@ q <- liftIO $ newTQueueIO _ <- forkIO $ logger q return $ Logger tid q- where logger q' = forever $ do+ where + logger q' = forever $ do msg <- atomically $ readTQueue q' putStrLn msg @@ -169,8 +168,7 @@ -- | Given a @builder@ function, make and run a test suite on a single transport testMain :: (NT.Transport -> IO [Test]) -> IO () testMain builder = do- Right (transport, _) <- createTransportExposeInternals- "127.0.0.1" "0" ("127.0.0.1",) defaultTCPParameters+ Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters testData <- builder transport defaultMain testData