Migrate to validation >= 1.2#1227
Open
carbolymer wants to merge 1 commit into
Open
Conversation
9a6bc8e to
8596896
Compare
8596896 to
e8f1e09
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates cardano-api off the pre-1.2 validation API by switching internal decoding logic to pattern-match on Validation’s Failure/Success, and updates build inputs (Cabal bounds + pinned package indexes) to support validation >= 1.2.
Changes:
- Update internal witness decoding to accumulate decoder failures via
Validationconstructors (notoEither/liftError). - Add a
validation >= 1.2lower bound incardano-api.cabal. - Bump
cabal.projectindex-state andflake.lockto newer package sets; add.serena/to.gitignore.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
flake.lock |
Updates pinned hackage.nix input to align with newer package set/index state. |
cardano-api/src/Cardano/Api/Tx/Internal/Sign.hs |
Replaces removed validation helpers with Failure/Success pattern matching for decoder selection. |
cardano-api/cardano-api.cabal |
Raises dependency lower bound to validation >= 1.2. |
cabal.project |
Bumps Hackage index-state to 2026-05-27. |
.gitignore |
Ignores .serena/ directory. |
.changes/20260527_cardano_api_validation_1_2.yml |
Adds changelog fragment documenting the migration and index-state bump. |
Comment on lines
+1
to
+3
| project: cardano-api | ||
| pr: 1227 | ||
| kind: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cardano-apifrom the pre-1.2validationAPI (toEither,liftError) to direct pattern matching onFailure/Successconstructors.validation >= 1.2lower bound incardano-api.cabal.2026-05-27.Context
validation1.2 removedtoEither,validate, andliftError.This was found when bumping
hackage.nixin CHaP (IntersectMBO/ouroboros-consensus#2051).Blocked on a new CHaP release of
ouroboros-consensuswhich also needs the same migration (already done on theirmain).Test plan
ouroboros-consensusis released to CHaP with validation 1.2 support