Skip to content

Commit

Permalink
Start upgrading the dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ch1bo committed Jul 20, 2021
1 parent 837d63d commit 75ca039
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .envrc
@@ -1 +1 @@
use nix
use nix -A cabalOnly
50 changes: 29 additions & 21 deletions cabal.project
@@ -1,8 +1,9 @@
index-state: 2021-06-02T00:00:00Z

packages:
local-cluster
hydra-node
-- NOTE(SN): disabled for repro (some conflict because cardano-node dep)
-- local-cluster
-- hydra-node
hydra-plutus
hydra-prelude

Expand All @@ -22,16 +23,17 @@ test-show-details: direct

allow-newer:
-- 'iohk-monitoring' -> 'ekg' -> 'snap-server' which has a < 0.14 upper bound for attoparsec
snap-server:attoparsec
attoparsec

-- NOTE: The following is taken from plutus-starter / plutus from 2021-06-11
-- NOTE: The following is taken from plutus from 2021-07-12

source-repository-package
type: git
location: https://github.com/input-output-hk/plutus.git
subdir:
freer-extras
playground-common
plutus-chain-index
plutus-core
plutus-contract
plutus-ledger
Expand All @@ -43,7 +45,7 @@ source-repository-package
prettyprinter-configurable
quickcheck-dynamic
word-array
tag: 5e20b2df3ac55b55b9d70eb7271b295ac797ed5e
tag: e3e220f5434d5cc01d613e656dc661acbadd55a5

-- The following sections are copied from the 'plutus' repository cabal.project at the revision
-- given above.
Expand All @@ -59,23 +61,27 @@ package eventful-sql-common
ghc-options: -XDerivingStrategies -XStandaloneDeriving -XUndecidableInstances -XDataKinds -XFlexibleInstances -XMultiParamTypeClasses

allow-newer:
-- Has a commit to allow newer aeson, not on Hackage yet
monoidal-containers:aeson
-- Pins to an old version of Template Haskell, unclear if/when it will be updated
, size-based:template-haskell
size-based:template-haskell

-- The following three dependencies are needed by plutus.
, eventful-sql-common:persistent
, eventful-sql-common:persistent-template
, ouroboros-consensus-byron:formatting
, beam-core:aeson
, beam-sqlite:aeson
, beam-sqlite:dlist
, beam-migrate:aeson

constraints:
-- aws-lambda-haskell-runtime-wai doesn't compile with newer versions
aws-lambda-haskell-runtime <= 3.0.3
-- big breaking change here, inline-r doens't have an upper bound
, singletons < 3.0
singletons < 3.0
-- breaks eventful even more than it already was
, persistent-template < 2.12
-- bizarre issue: in earlier versions they define their own 'GEq', in newer
-- ones they reuse the one from 'some', but there isn't e.g. a proper version
-- constraint from dependent-sum-template (which is the library we actually use).
, dependent-sum > 0.6.2.0

-- Drops an instance breaking our code. Should be released to Hackage eventually.
source-repository-package
Expand Down Expand Up @@ -123,8 +129,9 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: e50613562d6d4a0f933741fcf590b0f69a1eda67
tag: e338f2cf8e1078fbda9555dd2b169c6737ef6774
subdir:
monoidal-synchronisation
typed-protocols
typed-protocols-examples
ouroboros-network
Expand All @@ -135,7 +142,7 @@ source-repository-package
ouroboros-consensus-cardano
ouroboros-consensus-shelley
io-sim
io-sim-classes
io-classes
network-mux

source-repository-package
Expand All @@ -154,7 +161,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger-specs
tag: a3ef848542961079b7cd53d599e5385198a3035c
tag: 6b0fca7a73c317f3af7c14dd4dc38178cc78a6c8
subdir:
byron/chain/executable-spec
byron/crypto
Expand All @@ -178,21 +185,22 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-node.git
tag: b3cabae6b3bf30a0b1b4e78bc4b67282dabad0a6
tag: f3ef4ed72894499160f2330b91572a159005c148
subdir:
cardano-api
cardano-config
cardano-node
cardano-cli
cardano-config

source-repository-package
type: git
location: https://github.com/input-output-hk/Win32-network
tag: 94153b676617f8f33abe8d8182c37377d2784bd1
tag: 5b3d08c454f425da5cf045fe7865950d7c806691

source-repository-package
type: git
location: https://github.com/input-output-hk/hedgehog-extras
tag: 8bcd3c9dc22cc44f9fcfe161f4638a384fc7a187
-- source-repository-package
-- type: git
-- location: https://github.com/input-output-hk/hedgehog-extras
-- tag: 8bcd3c9dc22cc44f9fcfe161f4638a384fc7a187

-- The following two dependencies are not mirrored in the
-- stack.yaml file, but they are needed regardless by cabal.
Expand Down
2 changes: 1 addition & 1 deletion default.nix
Expand Up @@ -2,7 +2,7 @@
, system ? builtins.currentSystem
, haskellNix ? import
(builtins.fetchTarball
"https://github.com/input-output-hk/haskell.nix/archive/532e71470b41fc0fd0d3d858ea98d7f07f37d309.tar.gz")
"https://github.com/input-output-hk/haskell.nix/archive/3856d2d24dca0ecc71fcfc314253a2a2d07a3c4f.tar.gz")
{ }
, iohkNix ? import
(builtins.fetchTarball
Expand Down
4 changes: 2 additions & 2 deletions docs/adr/0005-use-io-sim-classes.md
@@ -1,4 +1,4 @@
# 5. Use io-sim-classes
# 5. Use io-classes

Date: 2021-06-08

Expand All @@ -18,7 +18,7 @@ There are other such libraries, e.g. [concurrency](https://hackage.haskell.org/p

## Decision

For all IO effects covered by the library, use functions from typeclasses exposed by [io-sim-classes](https://github.com/input-output-hk/ouroboros-network/tree/be47fbb3dbd237a37ad95759e89e455a0a563c19/io-sim-classes). As of this writing, this covers:
For all IO effects covered by the library, use functions from typeclasses exposed by [io-classes](https://github.com/input-output-hk/ouroboros-network/tree/e338f2cf8e1078fbda9555dd2b169c6737ef6774/io-classes). As of this writing, this covers:
* All STM operations through `MonadSTM`
* Time and timers through `MonadTime` and `MonadTimer`
* Concurrency through `MonadAsync`, `MonadFork`
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/0008-use-custom-prelude.md
Expand Up @@ -19,7 +19,7 @@ All-in-all, while it _does the job_, the base `Prelude` may not necessarily be t

## Decision

We'll use a custom prelude to help us get more productive and more importantly, to reduce the daily friction of our interactions with the base prelude. While [`relude`](https://hackage.haskell.org/package/relude) makes for a good candidate, we still chose to re-wrap it in a custom `Hydra.Prelude` module to grant us the ability to add or remove a few things specifics to Hydra and Cardano in general. In particular, we will hide from `relude` all the re-exports of the [`stm`](https://hackage.haskell.org/package/stm) library in favor of [`io-sim-classes`](https://github.com/input-output-hk/ouroboros-network/tree/36d8a4b7792ffcfa0c70eb56065071fbfa59af36/io-sim-classes) which we already use pervasively and which provides (among other things) most of the same capabilities.
We'll use a custom prelude to help us get more productive and more importantly, to reduce the daily friction of our interactions with the base prelude. While [`relude`](https://hackage.haskell.org/package/relude) makes for a good candidate, we still chose to re-wrap it in a custom `Hydra.Prelude` module to grant us the ability to add or remove a few things specifics to Hydra and Cardano in general. In particular, we will hide from `relude` all the re-exports of the [`stm`](https://hackage.haskell.org/package/stm) library in favor of [`io-classes`](https://github.com/input-output-hk/ouroboros-network/tree/e338f2cf8e1078fbda9555dd2b169c6737ef6774/io-classes) which we already use pervasively and which provides (among other things) most of the same capabilities.

## Consequences

Expand Down
2 changes: 1 addition & 1 deletion docs/adr/README.md
Expand Up @@ -6,6 +6,6 @@ Here is a list of currently accepted or discussed **Architecture Decision Record
2. Hydra Node is designed around a [Reactive Core](./0002-reactive-core.md)
3. It exposes a [Duplex Asynchronous API](./0003-asynchronous-duplex-api.md) using WebSockets protocol
4. We use the [Handle pattern](./0004-use-handle-to-model-effects.md) for effectful computations
5. We use [io-sim-classes](./0005-use-io-sim-classes.md) for all abstracting concurrency primitives
5. We use [io-classes](./0005-use-io-sim-classes.md) for all abstracting concurrency primitives
6. Network [broadcasts all messages](./0006-network-broadcasts-all-messages.md)
7. _Components are defined using [with-pattern](./0007-with-pattern-component-interfaces.md)_
4 changes: 2 additions & 2 deletions hydra-node/hydra-node.cabal
Expand Up @@ -120,7 +120,7 @@ library
, gitrev
, hydra-prelude
, hydra-plutus
, io-sim-classes
, io-classes
, iohk-monitoring
, iproute
, network
Expand Down Expand Up @@ -207,7 +207,7 @@ test-suite tests
, hydra-node
, hydra-prelude
, io-sim
, io-sim-classes
, io-classes
, iproute
, network
, process
Expand Down
2 changes: 1 addition & 1 deletion hydra-prelude/hydra-prelude.cabal
Expand Up @@ -27,7 +27,7 @@ library
base,
cardano-binary,
generic-random,
io-sim-classes,
io-classes,
network,
QuickCheck,
quickcheck-instances,
Expand Down
4 changes: 2 additions & 2 deletions local-cluster/local-cluster.cabal
Expand Up @@ -90,7 +90,7 @@ library
, http-conduit
, hydra-prelude
, hydra-node
, io-sim-classes
, io-classes
, iohk-monitoring
, network
, process
Expand Down Expand Up @@ -164,7 +164,7 @@ benchmark bench-e2e
, containers
, hydra-node
, hydra-prelude
, io-sim-classes
, io-classes
, lens
, lens-aeson
, local-cluster
Expand Down
3 changes: 2 additions & 1 deletion shell.nix
Expand Up @@ -5,7 +5,7 @@
# Latest haskell.nix for more likely cache hits
, haskellNix ? import
(builtins.fetchTarball
"https://github.com/input-output-hk/haskell.nix/archive/87084d65a476cc826a0e8c5d281d494254f5bc7a.tar.gz")
"https://github.com/input-output-hk/haskell.nix/archive/3856d2d24dca0ecc71fcfc314253a2a2d07a3c4f.tar.gz")
{ }
# Use same pkgs as haskell.nix for more likely cache hits
, nixpkgsSrc ? haskellNix.sources.nixpkgs-2009
Expand Down Expand Up @@ -82,6 +82,7 @@ let
pkgs.haskell.compiler.${compiler}
pkgs.cabal-install
pkgs.git
pkgs.pkgconfig
];

# Ensure that libz.so and other libraries are available to TH splices.
Expand Down

0 comments on commit 75ca039

Please sign in to comment.