Skip to content

Commit

Permalink
CDDL:alonzo: Switch to using Huddle/Cuddle.
Browse files Browse the repository at this point in the history
- Remove
  - crypto.cddl
  - extras.cddl
- Add
  - Test.Cardano.Ledger.Alonzo.CDDL
  - cardano-ledger-alonzo:exe:huddle-cddle
  - huddleRoundTrip(Ann)CborSpec for all definitions already being tested
- Autogenerate alonzo.cddl using Huddle/Cuddle
- Update
  - hie.yaml with alonzo paths module and huddle-cddl
  - gen-cddl.sh to include alonzo
  • Loading branch information
aniketd committed Dec 5, 2024
1 parent 13318b9 commit caa7d5c
Show file tree
Hide file tree
Showing 10 changed files with 998 additions and 428 deletions.
20 changes: 18 additions & 2 deletions eras/alonzo/impl/cardano-ledger-alonzo.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ category: Network
build-type: Simple
data-files:
cddl-files/alonzo.cddl
cddl-files/crypto.cddl
cddl-files/extras.cddl
golden/*.cbor

extra-source-files: CHANGELOG.md
Expand Down Expand Up @@ -103,6 +101,7 @@ library
library testlib
exposed-modules:
Test.Cardano.Ledger.Alonzo.Arbitrary
Test.Cardano.Ledger.Alonzo.CDDL
Test.Cardano.Ledger.Alonzo.Binary.Cddl
Test.Cardano.Ledger.Alonzo.Binary.CostModelsSpec
Test.Cardano.Ledger.Alonzo.Binary.RoundTrip
Expand Down Expand Up @@ -142,6 +141,8 @@ library testlib
cardano-ledger-shelley:{cardano-ledger-shelley, testlib},
cardano-strict-containers,
cardano-slotting,
cuddle,
heredoc,
plutus-ledger-api,
generic-random,
microlens,
Expand All @@ -153,6 +154,21 @@ library testlib
tree-diff,
QuickCheck

executable huddle-cddl
main-is: Main.hs
hs-source-dirs: huddle-cddl
other-modules: Paths_cardano_ledger_alonzo
default-language: Haskell2010
ghc-options:
-Wall -Wcompat -Wincomplete-record-updates
-Wincomplete-uni-patterns -Wredundant-constraints -Wpartial-fields
-Wunused-packages -threaded -rtsopts -with-rtsopts=-N

build-depends:
base,
testlib,
cardano-ledger-binary:testlib >=1.5

executable gen-golden
main-is: GenerateGoldenFileMain.hs
hs-source-dirs: test
Expand Down
Loading

0 comments on commit caa7d5c

Please sign in to comment.