distributed-process-execution 0.1.4.1 → 0.1.5.0
raw patch · 4 files changed
+25/−70 lines, 4 filesdep +tastydep +tasty-hunitdep −HUnitdep −QuickCheckdep −ansi-terminaldep ~containersdep ~data-accessordep ~deepseqPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: tasty, tasty-hunit
Dependencies removed: HUnit, QuickCheck, ansi-terminal, bytestring, distributed-static, fingertree, ghc-prim, mtl, network, test-framework, test-framework-hunit, test-framework-quickcheck2, time, transformers
Dependency ranges changed: containers, data-accessor, deepseq, hashable, stm
API changes (from Hackage documentation)
- Control.Distributed.Process.Execution: runExchange :: ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
+ Control.Distributed.Process.Execution: runExchange :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
- Control.Distributed.Process.Execution: startExchange :: ExchangeType s -> Process Exchange
+ Control.Distributed.Process.Execution: startExchange :: forall s. ExchangeType s -> Process Exchange
- Control.Distributed.Process.Execution: startSupervisedRef :: ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
+ Control.Distributed.Process.Execution: startSupervisedRef :: forall s. ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
- Control.Distributed.Process.Execution: type BindingSelector k = Message -> Process k
+ Control.Distributed.Process.Execution: type BindingSelector k = (Message -> Process k)
- Control.Distributed.Process.Execution.EventManager: addMessageHandler :: EventManager -> (s -> Message -> Process (Maybe s)) -> Process s -> Process ProcessId
+ Control.Distributed.Process.Execution.EventManager: addMessageHandler :: forall s. EventManager -> (s -> Message -> Process (Maybe s)) -> Process s -> Process ProcessId
- Control.Distributed.Process.Execution.Exchange: runExchange :: ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
+ Control.Distributed.Process.Execution.Exchange: runExchange :: forall s. ExchangeType s -> MVar (ControlPort ControlMessage) -> Process ()
- Control.Distributed.Process.Execution.Exchange: startExchange :: ExchangeType s -> Process Exchange
+ Control.Distributed.Process.Execution.Exchange: startExchange :: forall s. ExchangeType s -> Process Exchange
- Control.Distributed.Process.Execution.Exchange: startSupervised :: ExchangeType s -> SupervisorPid -> Process Exchange
+ Control.Distributed.Process.Execution.Exchange: startSupervised :: forall s. ExchangeType s -> SupervisorPid -> Process Exchange
- Control.Distributed.Process.Execution.Exchange: startSupervisedRef :: ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
+ Control.Distributed.Process.Execution.Exchange: startSupervisedRef :: forall s. ExchangeType s -> SupervisorPid -> Process (ProcessId, Message)
- Control.Distributed.Process.Execution.Exchange: type BindingSelector k = Message -> Process k
+ Control.Distributed.Process.Execution.Exchange: type BindingSelector k = (Message -> Process k)
Files
- ChangeLog +4/−0
- distributed-process-execution.cabal +11/−58
- tests/TestExchange.hs +5/−6
- tests/TestMailbox.hs +5/−6
ChangeLog view
@@ -1,3 +1,7 @@+2025-02-04 Laurent P. René de Cotret <laurent.decotret@outlook.com> 0.1.5.0++* Ported test suite to use `tasty` rather than `test-framework`.+ 2024-10-30 David Simmons-Duffin <dsd@caltech.edu> 0.1.4.1 * Bump dependency bound for ansi-terminal
distributed-process-execution.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name: distributed-process-execution-version: 0.1.4.1+version: 0.1.5.0 build-type: Simple license: BSD-3-Clause license-file: LICENCE@@ -16,7 +16,7 @@ The currently implementation provides only a subset of the plumbing required, comprising tools for event management, mailbox buffering and message routing. category: Control-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+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 GHC==9.12.1 extra-doc-files: ChangeLog source-repository head@@ -33,6 +33,7 @@ -Wredundant-constraints -fhide-source-paths -Wpartial-fields+ -Wunused-packages library import: warnings@@ -45,14 +46,10 @@ distributed-process-client-server >= 0.2.0 && < 0.3, binary >= 0.8 && < 0.9, deepseq >= 1.4 && < 1.7,- mtl, 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.6,- time,- transformers hs-source-dirs: src exposed-modules: Control.Distributed.Process.Execution,@@ -69,38 +66,16 @@ test-suite ExchangeTests import: warnings type: exitcode-stdio-1.0--- x-uses-tf: true- build-depends:- base >= 4.14 && < 5,- ansi-terminal >= 0.5 && < 1.2,- containers,- hashable,- unordered-containers >= 0.2.3.0 && < 0.3,+ build-depends: base >= 4.14 && < 5, distributed-process, distributed-process-execution, distributed-process-extras, distributed-process-systest ^>= 0.4,- distributed-static,- bytestring,- data-accessor,- fingertree < 0.2, network-transport >= 0.4 && < 0.6,- deepseq,- mtl, network-transport-tcp >= 0.4 && < 0.9,- binary >= 0.8 && < 0.9,- network >= 2.3 && < 3.3,- HUnit >= 1.2 && < 2,- stm,- time,- test-framework >= 0.6 && < 0.9,- test-framework-hunit,- QuickCheck >= 2.4,- test-framework-quickcheck2,- transformers,- ghc-prim- hs-source-dirs:- tests+ tasty >= 1.5 && <1.6,+ tasty-hunit >=0.10 && <0.11,+ hs-source-dirs: tests ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind main-is: TestExchange.hs default-language: Haskell2010@@ -109,38 +84,16 @@ test-suite MailboxTests import: warnings type: exitcode-stdio-1.0--- x-uses-tf: true- build-depends:- base >= 4.14 && < 5,- ansi-terminal >= 0.5 && < 1.2,- containers,- hashable,- unordered-containers >= 0.2.3.0 && < 0.3,+ build-depends: base >= 4.14 && < 5, distributed-process, distributed-process-execution, distributed-process-extras, distributed-process-systest ^>= 0.4,- distributed-static,- bytestring,- data-accessor,- fingertree < 0.2, network-transport >= 0.4 && < 0.6,- deepseq,- mtl, network-transport-tcp >= 0.4 && < 0.9,- binary >= 0.8 && < 0.9,- network >= 2.3 && < 3.3,- HUnit >= 1.2 && < 2,- stm,- time,- test-framework >= 0.6 && < 0.9,- test-framework-hunit,- QuickCheck >= 2.4,- test-framework-quickcheck2,- transformers,- ghc-prim- hs-source-dirs:- tests+ tasty >= 1.5 && <1.6,+ tasty-hunit >=0.10 && <0.11,+ hs-source-dirs: tests ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind main-is: TestMailbox.hs other-modules: MailboxTestFilters
tests/TestExchange.hs view
@@ -22,9 +22,8 @@ import Prelude hiding (drop) import Network.Transport.TCP import qualified Network.Transport as NT-import Test.Framework as TF (defaultMain, testGroup, Test)-import Test.Framework.Providers.HUnit-import Test.HUnit (assertEqual, assertBool)+import Test.Tasty (defaultMain, testGroup, TestTree)+import Test.Tasty.HUnit (assertEqual, assertBool, testCase) testKeyBasedRouting :: TestResult Bool -> Process () testKeyBasedRouting result = do@@ -158,10 +157,10 @@ myRemoteTable = Control.Distributed.Process.Extras.__remoteTable initRemoteTable -tests :: NT.Transport -> IO [Test]+tests :: NT.Transport -> IO TestTree tests transport = do localNode <- newLocalNode transport myRemoteTable- return [+ return $ testGroup "" [ testGroup "Event Manager" [ testCase "Simple Event Handlers"@@ -187,7 +186,7 @@ main = testMain $ tests -- | Given a @builder@ function, make and run a test suite on a single transport-testMain :: (NT.Transport -> IO [Test]) -> IO ()+testMain :: (NT.Transport -> IO TestTree) -> IO () testMain builder = do Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "10501") defaultTCPParameters testData <- builder transport
tests/TestMailbox.hs view
@@ -17,9 +17,8 @@ import Data.Maybe (catMaybes) -import Test.Framework as TF (defaultMain, testGroup, Test)-import Test.Framework.Providers.HUnit-import Test.HUnit (assertEqual)+import Test.Tasty (defaultMain, testGroup, TestTree)+import Test.Tasty.HUnit (assertEqual, testCase) import qualified MailboxTestFilters (__remoteTable) import MailboxTestFilters (myFilter, intFilter)@@ -175,11 +174,11 @@ Control.Distributed.Process.Extras.__remoteTable $ MailboxTestFilters.__remoteTable initRemoteTable -tests :: NT.Transport -> IO [Test]+tests :: NT.Transport -> IO TestTree tests transport = do {- verboseCheckWithResult stdArgs -} localNode <- newLocalNode transport myRemoteTable- return [+ return $ testGroup "" [ testGroup "Dequeue/Pop Ordering" [ testCase "Queue Ordering"@@ -253,7 +252,7 @@ main = testMain $ tests -- | Given a @builder@ function, make and run a test suite on a single transport-testMain :: (NT.Transport -> IO [Test]) -> IO ()+testMain :: (NT.Transport -> IO TestTree) -> IO () testMain builder = do Right (transport, _) <- createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "10501") defaultTCPParameters testData <- builder transport