Skip to content

Commit 96455dc

Browse files
authored
Merge branch 'master' into upon-10.13.1.0
2 parents 4b7d11f + 65f269f commit 96455dc

28 files changed

+580
-193
lines changed

.github/workflows/hls.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,80 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v4
2323

24+
- name: Check if changes were trivial
25+
id: check_trivial_changes
26+
run: |
27+
git fetch origin ${{ github.base_ref }} --unshallow
28+
base_ref=origin/${{ github.base_ref }}
29+
head_ref=HEAD
30+
changed_files=$(git diff-tree --name-status -r "$base_ref".."$head_ref" -- | cut -f2 -d$'\t')
31+
# Flag to check whether we do the rest of checks
32+
exception=true
33+
34+
for file in $changed_files; do
35+
# If changes were to a markdown file we don't mind
36+
if [[ $file == *.md ]]; then
37+
echo "$file: is markdown, so it doesn't matter (trivial change)"
38+
continue
39+
fi
40+
41+
# If changes were to a .cabal file, we ensure only the version changed
42+
if [[ $file == *.cabal ]]; then
43+
# If file doesn't exist it means it was moved or removed
44+
if [ ! -f "$file" ]; then
45+
echo "$file: was moved or removed and is a cabal file (non-trivial change)"
46+
exception=false
47+
break
48+
fi
49+
50+
# We ensure the only change was to the version field
51+
diff_version=$(git diff "$base_ref".."$head_ref" -- "$file" | perl -ne 'print if /^-(?!version:)/' | wc -l)
52+
diff_no_version=$(git diff "$base_ref".."$head_ref" -- "$file" | perl -ne 'print if /^\+(?!version:)/' | wc -l)
53+
54+
if [ "$diff_version" -gt 1 ] || [ "$diff_no_version" -gt 1 ]; then
55+
echo "$file: was modified beyond the version tag (non-trivial change)"
56+
exception=false
57+
break
58+
fi
59+
echo "In $file, at most the version field was modified"
60+
else
61+
# If other types of files were changed, do not skip the checks
62+
echo "$file: was changed and is not a markdown nor a cabal file (non-trivial change)"
63+
exception=false
64+
break
65+
fi
66+
done
67+
68+
if $exception; then
69+
echo "CHECK_HLS_WORKS=0" >> "$GITHUB_OUTPUT"
70+
echo "All changes are trival, skipping rest of checks..."
71+
else
72+
echo "CHECK_HLS_WORKS=1" >> "$GITHUB_OUTPUT"
73+
echo "Some changes are non-trivial. We need to do the checks!"
74+
fi
2475
- uses: cachix/install-nix-action@v30
76+
if: steps.check_trivial_changes.outputs.CHECK_HLS_WORKS > 0
2577
with:
2678
nix_path: nixpkgs=channel:nixos-unstable
2779
extra_nix_config: |
2880
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=
2981
substituters = https://cache.iog.io/ https://cache.nixos.org/
3082
3183
- uses: rrbutani/use-nix-shell-action@v1
84+
if: steps.check_trivial_changes.outputs.CHECK_HLS_WORKS > 0
3285

3386
- name: Update dependencies
87+
if: steps.check_trivial_changes.outputs.CHECK_HLS_WORKS > 0
3488
run: cabal update; cabal freeze
3589

3690
- name: Obtain GHC version
91+
if: steps.check_trivial_changes.outputs.CHECK_HLS_WORKS > 0
3792
run: |
3893
echo "VERSION=$(ghc --numeric-version)" >> "$GITHUB_OUTPUT"
3994
id: ghc
4095

4196
- name: HLS caching
97+
if: steps.check_trivial_changes.outputs.CHECK_HLS_WORKS > 0
4298
uses: actions/cache@v4
4399
with:
44100
path: |
@@ -52,4 +108,5 @@ jobs:
52108
hls-cache-${{ env.HLS_CACHE_VERSION }}-${{ runner.os }}-${{ steps.ghc.outputs.VERSION }}-${{ hashFiles('**/cabal.project.freeze') }}-
53109
54110
- name: Test HLS works
111+
if: steps.check_trivial_changes.outputs.CHECK_HLS_WORKS > 0
55112
run: haskell-language-server

cabal.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ repository cardano-haskell-packages
1313
-- See CONTRIBUTING for information about these, including some Nix commands
1414
-- you need to run if you change them
1515
index-state:
16-
, hackage.haskell.org 2025-04-06T22:39:33Z
17-
, cardano-haskell-packages 2025-04-07T00:07:03Z
16+
, hackage.haskell.org 2025-04-08T10:52:25Z
17+
, cardano-haskell-packages 2025-04-16T15:55:07Z
1818

1919
packages:
2020
cardano-api

cardano-api/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog for cardano-api
22

3+
## 10.14.0.0
4+
5+
- Update to Plutus 1.45
6+
(feature, compatible)
7+
[PR 818](https://github.com/IntersectMBO/cardano-api/pull/818)
8+
9+
- Implement the changes required for UTxO-HD. See the documentation https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/utxo-hd/Overview.
10+
- Augment `Cardano.Api.Internal.LedgerState.LedgerState` with Cardano `LedgerTables`.
11+
- Require `SingI` for `QueryFootprint`s in Consensus queries
12+
(feature, breaking)
13+
[PR 774](https://github.com/IntersectMBO/cardano-api/pull/774)
14+
15+
- Better reporting of negative balance in transaction balancing. Remove redundant `Either` from `evaluateTransactionExecutionUnits` and `evaluateTransactionExecutionUnitsShelley` signatures.
16+
(breaking, refactoring, bugfix)
17+
[PR 799](https://github.com/IntersectMBO/cardano-api/pull/799)
18+
19+
- Add `outputs`, `fromShelleyUTxO` and `toShelleyUTxO` functions to `Cardano.Api.Tx.UTxO`.
20+
(compatible)
21+
[PR 812](https://github.com/IntersectMBO/cardano-api/pull/812)
22+
23+
- New `ToJSON (Consensus.ChainDepState (ConsensusProtocol era))` constraints for shelley based eons.
24+
New constraints for `ShelleyBasedEra`:
25+
* FromCBOR (Consensus.ChainDepState (ConsensusProtocol era))
26+
* IsCardanoEra era
27+
* IsShelleyBasedEra era
28+
(feature)
29+
[PR 806](https://github.com/IntersectMBO/cardano-api/pull/806)
30+
331
## 10.13.1.0
432

533
- Fix `toAnyWitness` to not ignore simple scripts

cardano-api/cardano-api.cabal

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.4
22
name: cardano-api
3-
version: 10.13.1.0
3+
version: 10.14.0.0
44
synopsis: The cardano API
55
description: The cardano API.
66
category:
@@ -155,25 +155,27 @@ library
155155
network-mux,
156156
nothunks,
157157
ordered-containers,
158-
ouroboros-consensus ^>=0.24,
159-
ouroboros-consensus-cardano ^>=0.23,
160-
ouroboros-consensus-diffusion ^>=0.19 || ^>=0.21,
158+
ouroboros-consensus ^>=0.25,
159+
ouroboros-consensus-cardano ^>=0.24,
160+
ouroboros-consensus-diffusion ^>=0.22,
161161
ouroboros-consensus-protocol ^>=0.11,
162162
ouroboros-network,
163163
ouroboros-network-api >=0.13,
164164
ouroboros-network-framework,
165165
ouroboros-network-protocols,
166166
parsec,
167-
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.43,
167+
plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} ^>=1.45,
168168
prettyprinter,
169169
prettyprinter-ansi-terminal,
170170
prettyprinter-configurable ^>=1.36,
171171
random,
172172
safe-exceptions,
173173
scientific,
174174
serialise,
175+
singletons,
175176
small-steps ^>=1.1,
176177
sop-core,
178+
sop-extras,
177179
stm,
178180
strict-sop-core,
179181
time,
@@ -418,7 +420,7 @@ test-suite cardano-api-golden
418420
hedgehog-extras ^>=0.7,
419421
microlens,
420422
parsec,
421-
plutus-core ^>=1.43,
423+
plutus-core ^>=1.45,
422424
plutus-ledger-api,
423425
tasty,
424426
tasty-hedgehog,

cardano-api/src/Cardano/Api.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,7 @@ module Cardano.Api
850850
, AnyNewEpochState (..)
851851
, foldEpochState
852852
, getAnyNewEpochState
853+
, getLedgerTablesUTxOValues
853854

854855
-- *** Errors
855856
, LedgerStateError (..)

cardano-api/src/Cardano/Api/Internal/Eon/AllegraEraOnwards.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ type AllegraEraOnwardsConstraints era =
9898
, FromCBOR (DebugLedgerState era)
9999
, IsCardanoEra era
100100
, IsShelleyBasedEra era
101+
, ToJSON (Consensus.ChainDepState (ConsensusProtocol era))
101102
, ToJSON (DebugLedgerState era)
102103
, Typeable era
103104
)

cardano-api/src/Cardano/Api/Internal/Eon/AlonzoEraOnwards.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ type AlonzoEraOnwardsConstraints era =
112112
, FromCBOR (DebugLedgerState era)
113113
, IsCardanoEra era
114114
, IsShelleyBasedEra era
115+
, ToJSON (Consensus.ChainDepState (ConsensusProtocol era))
115116
, ToJSON (DebugLedgerState era)
116117
, Typeable era
117118
)

cardano-api/src/Cardano/Api/Internal/Eon/BabbageEraOnwards.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ type BabbageEraOnwardsConstraints era =
116116
, FromCBOR (DebugLedgerState era)
117117
, IsCardanoEra era
118118
, IsShelleyBasedEra era
119+
, ToJSON (Consensus.ChainDepState (ConsensusProtocol era))
119120
, ToJSON (DebugLedgerState era)
120121
, Typeable era
121122
)

cardano-api/src/Cardano/Api/Internal/Eon/ConwayEraOnwards.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ type ConwayEraOnwardsConstraints era =
119119
, FromCBOR (DebugLedgerState era)
120120
, IsCardanoEra era
121121
, IsShelleyBasedEra era
122+
, ToJSON (Consensus.ChainDepState (ConsensusProtocol era))
122123
, ToJSON (DebugLedgerState era)
123124
, Typeable era
124125
)

cardano-api/src/Cardano/Api/Internal/Eon/MaryEraOnwards.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ type MaryEraOnwardsConstraints era =
100100
, FromCBOR (DebugLedgerState era)
101101
, IsCardanoEra era
102102
, IsShelleyBasedEra era
103+
, ToJSON (Consensus.ChainDepState (ConsensusProtocol era))
103104
, ToJSON (DebugLedgerState era)
104105
, Typeable era
105106
)

0 commit comments

Comments
 (0)