-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move
Compatibility.{Ledger,LedgerSpec}
to conversions
package.
The `Compatibility.Ledger` module was located in `cardano-balance-tx`. The `Compatibility.LedgerSpec` module was located in `cardano-wallet`. This commit co-locates both modules within a new package called `cardano-wallet-conversions`. This makes it possible for both `cardano-wallet` and `cardano-balance-tx` to depend upon these conversion functions without having to export them from the public interface of `cardano-balance-tx`. Note that in order to perform this relocation, this commit also clones the definition of a single QuickCheck generator: `Cardano.Wallet.Gen.genScript`.
- Loading branch information
1 parent
735efa0
commit 07b7ad9
Showing
9 changed files
with
144 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
cabal-version: 3.0 | ||
name: cardano-wallet-conversions | ||
version: 2023.7.18 | ||
synopsis: Miscellaneous conversion functions. | ||
description: Please see README.md. | ||
homepage: https://github.com/cardano-foundation/cardano-wallet | ||
author: Cardano Foundation (High Assurance Lab) | ||
maintainer: hal@cardanofoundation.org | ||
copyright: 2018-2022 IOHK, 2023 Cardano Foundation | ||
license: Apache-2.0 | ||
category: Blockchain, Cardano | ||
build-type: Simple | ||
|
||
common language | ||
default-language: Haskell2010 | ||
default-extensions: | ||
NoImplicitPrelude | ||
OverloadedStrings | ||
|
||
common opts-lib | ||
ghc-options: -Wall -Wcompat -fwarn-redundant-constraints | ||
|
||
if flag(release) | ||
ghc-options: -O2 -Werror | ||
|
||
common opts-exe | ||
ghc-options: -threaded -rtsopts -Wall | ||
|
||
if flag(release) | ||
ghc-options: -O2 -Werror | ||
|
||
flag release | ||
description: Enable optimization and `-Werror` | ||
default: False | ||
manual: True | ||
|
||
library | ||
import: language, opts-lib | ||
hs-source-dirs: lib | ||
build-depends: | ||
, base | ||
, bytestring | ||
, cardano-addresses | ||
, cardano-crypto-class | ||
, cardano-ledger-allegra | ||
, cardano-ledger-alonzo | ||
, cardano-ledger-babbage | ||
, cardano-ledger-core | ||
, cardano-ledger-mary | ||
, cardano-ledger-shelley | ||
, cardano-ledger-shelley-ma | ||
, cardano-slotting | ||
, cardano-strict-containers | ||
, cardano-wallet-primitive | ||
, containers | ||
, fmt | ||
, generic-lens | ||
, int-cast | ||
, ouroboros-consensus-cardano | ||
exposed-modules: | ||
Cardano.Wallet.Shelley.Compatibility.Ledger | ||
|
||
test-suite test | ||
import: language, opts-exe | ||
ghc-options: -with-rtsopts=-M2G -with-rtsopts=-N4 | ||
type: exitcode-stdio-1.0 | ||
hs-source-dirs: test/spec | ||
main-is: run-test-suite.hs | ||
build-depends: | ||
, base | ||
, bytestring | ||
, cardano-addresses | ||
, cardano-ledger-allegra:{cardano-ledger-allegra, testlib} | ||
, cardano-wallet-conversions | ||
, cardano-wallet-launcher | ||
, cardano-wallet-primitive | ||
, cardano-wallet-test-utils | ||
, hspec | ||
, hspec-core | ||
, ouroboros-consensus-cardano | ||
, QuickCheck | ||
build-tool-depends: hspec-discover:hspec-discover | ||
other-modules: | ||
Cardano.Wallet.Shelley.Compatibility.LedgerSpec | ||
Spec | ||
SpecHook |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module SpecHook where | ||
|
||
import Test.Hspec | ||
|
||
hook :: Spec -> Spec | ||
hook = parallel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module Main where | ||
|
||
import Prelude | ||
|
||
import Cardano.Startup | ||
( withUtf8Encoding ) | ||
import Test.Hspec.Extra | ||
( hspecMain ) | ||
|
||
import qualified Spec | ||
|
||
main :: IO () | ||
main = withUtf8Encoding $ hspecMain Spec.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters