From 5191eceba3f4f433812ddd0da43745ee9f7a7f9b Mon Sep 17 00:00:00 2001 From: Laurent Rene de Cotret Date: Sat, 31 Aug 2024 14:11:40 -0400 Subject: [PATCH] Update dependencies to make everything build --- .github/workflows/cabal.yml | 55 +++++++++++++++++++ .../{distributed-process-ci.yml => stack.yml} | 2 +- cabal.project | 6 +- .../distributed-process-async.cabal | 4 +- .../distributed-process-client-server.cabal | 2 +- .../distributed-process-execution.cabal | 18 +++--- .../distributed-process-extras.cabal | 20 +++---- .../distributed-process-supervisor.cabal | 22 ++++---- .../Distributed/Process/Supervisor/Types.hs | 2 +- .../distributed-process.cabal | 2 +- .../network-transport-tcp.cabal | 2 +- .../network-transport/network-transport.cabal | 2 +- 12 files changed, 95 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/cabal.yml rename .github/workflows/{distributed-process-ci.yml => stack.yml} (97%) diff --git a/.github/workflows/cabal.yml b/.github/workflows/cabal.yml new file mode 100644 index 00000000..5245bd59 --- /dev/null +++ b/.github/workflows/cabal.yml @@ -0,0 +1,55 @@ +name: Continuous integration with cabal + +on: [push, pull_request] + +jobs: + continuous-integration: + strategy: + matrix: + ghc-version: + - "9.0.2" + - "9.2.8" + - "9.4.5" + - "9.6.4" + - "9.8.2" + - "9.10.1" + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install cabal/ghc + uses: haskell-actions/setup@v2 + id: setup-haskell + with: + ghc-version: ${{ matrix.ghc-version }} + cabal-version: '3.10.3.0' + + - name: Generate freeze file + run: | + cabal update + cabal configure --disable-optimization --enable-tests + cabal freeze + # 'cabal freeze' will use the nearest index state which might not be exactly equal + # to the index state specified in 'cabal.project' + sed '/^index-state: /d' cabal.project.freeze > dependencies-versions + + - name: Cache cabal work + uses: actions/cache@v4 + with: + path: | + dist-newstyle + ${{ steps.setup-haskell.outputs.cabal-store }} + # We are using the hash of 'cabal.project.local' so that different levels + # of optimizations are cached separately + key: ${{ runner.os }}-${{ hashFiles('dependencies-versions', 'cabal.project', 'cabal.project.local') }}-cabal-install + + - name: Build dependencies only + run: cabal build all --only-dependencies + + - name: Build all packages + run: cabal build all + + - name: Run all tests + run: cabal test all \ No newline at end of file diff --git a/.github/workflows/distributed-process-ci.yml b/.github/workflows/stack.yml similarity index 97% rename from .github/workflows/distributed-process-ci.yml rename to .github/workflows/stack.yml index 5d696ee2..1425b4d1 100644 --- a/.github/workflows/distributed-process-ci.yml +++ b/.github/workflows/stack.yml @@ -1,4 +1,4 @@ -name: distributed-process-ci +name: Continuous integration with stack on: [push, pull_request] jobs: test: diff --git a/cabal.project b/cabal.project index 2ae9a9c1..4eeb22f6 100644 --- a/cabal.project +++ b/cabal.project @@ -1,6 +1,4 @@ packages: packages/*/**.cabal -allow-newer: distributed-static:containers - , distributed-process-extras:containers - , distributed-process-extras:hashable - , distributed-process-extras:stm \ No newline at end of file +package distributed-process-tests + flags: +tcp \ No newline at end of file diff --git a/packages/distributed-process-async/distributed-process-async.cabal b/packages/distributed-process-async/distributed-process-async.cabal index 7e14b8e5..63abb265 100644 --- a/packages/distributed-process-async/distributed-process-async.cabal +++ b/packages/distributed-process-async/distributed-process-async.cabal @@ -31,7 +31,7 @@ library deepseq >= 1.3.0.1 && < 1.6, mtl, containers >= 0.4 && < 0.8, - hashable >= 1.2.0.5 && < 1.5, + hashable >= 1.2.0.5 && < 1.6, unordered-containers >= 0.2.3.0 && < 0.3, fingertree < 0.2, stm >= 2.4 && < 2.6, @@ -63,7 +63,7 @@ test-suite AsyncTests binary >= 0.6.3.0 && < 0.9, deepseq >= 1.3.0.1 && < 1.6, -- HUnit >= 1.2 && < 2, - stm >= 2.3 && < 2.5, + stm >= 2.3 && < 2.6, test-framework >= 0.6 && < 0.9, test-framework-hunit, rematch >= 0.2.0.0, diff --git a/packages/distributed-process-client-server/distributed-process-client-server.cabal b/packages/distributed-process-client-server/distributed-process-client-server.cabal index 2972a30b..310381b4 100644 --- a/packages/distributed-process-client-server/distributed-process-client-server.cabal +++ b/packages/distributed-process-client-server/distributed-process-client-server.cabal @@ -37,7 +37,7 @@ library unordered-containers >= 0.2.3.0 && < 0.3, fingertree < 0.2, stm >= 2.4 && < 2.6, - time > 1.4 && < 1.9.2, + time > 1.4 && < 1.15, transformers, exceptions >= 0.5 && < 0.11 if impl(ghc <= 7.5) diff --git a/packages/distributed-process-execution/distributed-process-execution.cabal b/packages/distributed-process-execution/distributed-process-execution.cabal index 3d8e1ff1..5b4fb174 100644 --- a/packages/distributed-process-execution/distributed-process-execution.cabal +++ b/packages/distributed-process-execution/distributed-process-execution.cabal @@ -29,18 +29,18 @@ library build-depends: base >= 4.4 && < 5, data-accessor >= 0.2.2.3, - distributed-process >= 0.6.6 && < 0.7, + distributed-process >= 0.6.6 && < 0.8, distributed-process-extras >= 0.3.1 && < 0.4, distributed-process-supervisor >= 0.2.0 && < 0.3, distributed-process-client-server >= 0.2.0 && < 0.3, binary >= 0.6.3.0 && < 0.9, - deepseq >= 1.3.0.1 && < 1.5, + deepseq >= 1.3.0.1 && < 1.6, mtl, - containers >= 0.4 && < 0.6, - hashable >= 1.2.0.5 && < 1.3, + containers >= 0.4 && < 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, + stm >= 2.4 && < 2.6, time, transformers if impl(ghc <= 7.5) @@ -80,13 +80,13 @@ test-suite ExchangeTests data-accessor, fingertree < 0.2, network-transport >= 0.4 && < 0.5, - deepseq >= 1.3.0.1 && < 1.5, + deepseq, mtl, network-transport-tcp >= 0.4 && < 0.6, binary >= 0.6.3.0 && < 0.9, network >= 2.3 && < 2.7, HUnit >= 1.2 && < 2, - stm >= 2.3 && < 2.5, + stm, time, test-framework >= 0.6 && < 0.9, test-framework-hunit, @@ -120,13 +120,13 @@ test-suite MailboxTests data-accessor, fingertree < 0.2, network-transport >= 0.4 && < 0.5, - deepseq >= 1.3.0.1 && < 1.5, + deepseq, mtl, network-transport-tcp >= 0.4 && < 0.6, binary >= 0.6.3.0 && < 0.9, network >= 2.3 && < 2.7, HUnit >= 1.2 && < 2, - stm >= 2.3 && < 2.5, + stm, time, test-framework >= 0.6 && < 0.9, test-framework-hunit, diff --git a/packages/distributed-process-extras/distributed-process-extras.cabal b/packages/distributed-process-extras/distributed-process-extras.cabal index 897cd356..5d44ad81 100644 --- a/packages/distributed-process-extras/distributed-process-extras.cabal +++ b/packages/distributed-process-extras/distributed-process-extras.cabal @@ -34,12 +34,12 @@ library binary >= 0.6.3.0 && < 0.9, deepseq >= 1.3.0.1 && < 1.6, mtl >= 2.0 && < 2.4, - containers >= 0.4 && < 0.6, + containers >= 0.4 && < 0.8, exceptions >= 0.5, - hashable >= 1.2.0.5 && < 1.3, + hashable >= 1.2.0.5 && < 1.6, unordered-containers >= 0.2.3.0 && < 0.3, fingertree < 0.2, - stm >= 2.4 && < 2.5, + stm >= 2.4 && < 2.6, transformers >= 0.2 && < 0.6 if flag(old-locale) Build-Depends: time < 1.5, old-locale >= 1.0 && <1.1 @@ -99,13 +99,13 @@ test-suite PrimitivesTests distributed-process-systest >= 0.1.0 && < 0.3.0, network-transport >= 0.4 && < 0.6, mtl, - containers >= 0.4 && < 0.6, + containers, network-transport-tcp >= 0.4 && < 0.6, binary >= 0.6.3.0 && < 0.9, - deepseq >= 1.3.0.1 && < 1.6, + deepseq, network >= 2.3 && < 2.7, HUnit >= 1.2 && < 2, - stm >= 2.3 && < 2.5, + stm, test-framework >= 0.6 && < 0.9, test-framework-hunit, rematch >= 0.2.0.0, @@ -122,7 +122,7 @@ test-suite TimerTests build-depends: base >= 4.6 && < 5, ansi-terminal >= 0.5 && < 0.9, - deepseq >= 1.3.0.1 && < 1.6, + deepseq, distributed-process >= 0.6.0 && < 0.8, distributed-process-extras, distributed-process-systest >= 0.1.0 && < 0.3.0, @@ -159,14 +159,14 @@ test-suite LoggerTests data-accessor, fingertree < 0.2, network-transport >= 0.4 && < 0.6, - deepseq >= 1.3.0.1 && < 1.6, + deepseq, mtl, network-transport-tcp >= 0.4 && < 0.6, binary >= 0.6.3.0 && < 0.9, network >= 2.3 && < 2.7, HUnit >= 1.2 && < 2, - stm >= 2.3 && < 2.5, - time > 1.4 && < 1.9, + stm, + time > 1.4 && < 1.15, test-framework >= 0.6 && < 0.9, test-framework-hunit, transformers, diff --git a/packages/distributed-process-supervisor/distributed-process-supervisor.cabal b/packages/distributed-process-supervisor/distributed-process-supervisor.cabal index 32e7511b..b4a4c531 100644 --- a/packages/distributed-process-supervisor/distributed-process-supervisor.cabal +++ b/packages/distributed-process-supervisor/distributed-process-supervisor.cabal @@ -38,14 +38,14 @@ library 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, + deepseq >= 1.3.0.1 && < 1.6, mtl, - containers >= 0.4 && < 0.6, - hashable >= 1.2.0.5 && < 1.3, + containers >= 0.4 && < 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 @@ -79,11 +79,11 @@ test-suite SupervisorTests mtl, network-transport-tcp >= 0.4 && < 0.7, binary >= 0.6.3.0 && < 0.9, - deepseq >= 1.3.0.1 && < 1.5, + deepseq, network >= 2.3 && < 2.7, 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, @@ -119,11 +119,11 @@ test-suite NonThreadedSupervisorTests mtl, network-transport-tcp >= 0.4 && < 0.7, binary >= 0.6.3.0 && < 0.9, - deepseq >= 1.3.0.1 && < 1.5, + deepseq, network >= 2.3 && < 2.7, 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, diff --git a/packages/distributed-process-supervisor/src/Control/Distributed/Process/Supervisor/Types.hs b/packages/distributed-process-supervisor/src/Control/Distributed/Process/Supervisor/Types.hs index 3be932c3..e330fc14 100644 --- a/packages/distributed-process-supervisor/src/Control/Distributed/Process/Supervisor/Types.hs +++ b/packages/distributed-process-supervisor/src/Control/Distributed/Process/Supervisor/Types.hs @@ -80,7 +80,7 @@ type ChildPid = ProcessId -- | 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 diff --git a/packages/distributed-process/distributed-process.cabal b/packages/distributed-process/distributed-process.cabal index 2c18f557..01cf537f 100644 --- a/packages/distributed-process/distributed-process.cabal +++ b/packages/distributed-process/distributed-process.cabal @@ -43,7 +43,7 @@ flag old-locale Library Build-Depends: base >= 4.9 && < 5, binary >= 0.6.3 && < 0.10, - hashable >= 1.2.0.5 && < 1.5, + hashable >= 1.2.0.5 && < 1.6, network-transport >= 0.4.1.0 && < 0.6, stm >= 2.4 && < 2.6, transformers >= 0.2 && < 0.7, diff --git a/packages/network-transport-tcp/network-transport-tcp.cabal b/packages/network-transport-tcp/network-transport-tcp.cabal index b5d5224b..d60fad38 100644 --- a/packages/network-transport-tcp/network-transport-tcp.cabal +++ b/packages/network-transport-tcp/network-transport-tcp.cabal @@ -29,7 +29,7 @@ Library async >= 2.2 && < 2.3, network-transport >= 0.5 && < 0.6, data-accessor >= 0.2 && < 0.3, - containers >= 0.4 && < 0.7, + containers >= 0.4 && < 0.8, bytestring >= 0.9 && < 0.13, network >= 3.1 && < 3.3, uuid >= 1.3 && < 1.4 diff --git a/packages/network-transport/network-transport.cabal b/packages/network-transport/network-transport.cabal index c39c60d8..7d6d15b8 100644 --- a/packages/network-transport/network-transport.cabal +++ b/packages/network-transport/network-transport.cabal @@ -67,7 +67,7 @@ Library Build-Depends: base >= 4.6 && < 5, binary >= 0.5 && < 0.9, bytestring >= 0.9 && < 0.13, - hashable >= 1.2.0.5 && < 1.5, + hashable >= 1.2.0.5 && < 1.6, transformers >= 0.2 && < 0.7, deepseq >= 1.0 && < 1.6 if impl(ghc < 7.6)