Skip to content

Experimental api propagation 2025-05-23 - #1200

Merged
Jimbo4350 merged 7 commits into
masterfrom
jordan/experimental-api-propagation-20250523
May 27, 2025
Merged

Jimbo4350 merged 7 commits into
masterfrom
jordan/experimental-api-propagation-20250523

Conversation

@Jimbo4350

Copy link
Copy Markdown
Contributor

Changelog

- description: |
   Experimental api propagation 2025-05-23
# uncomment types applicable to the change:
  type:
  - refactoring  

Context

Additional context for the PR goes here. If the PR fixes a particular issue please provide a link to the issue.

How to trust this PR

Highlight important bits of the PR that will make the review faster. If there are commands the reviewer can run to observe the new behavior, describe them.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@Jimbo4350
Jimbo4350 force-pushed the jordan/experimental-api-propagation-20250523 branch from e88d2c4 to 90b0999 Compare May 26, 2025 19:37
Comment on lines +149 to +151
case Exp.sbeToEra $ convert cEraOnwards of
Left deprecatedEra -> throwCliError deprecatedEra
Right e -> do

@carbolymer carbolymer May 27, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
case Exp.sbeToEra $ convert cEraOnwards of
Left deprecatedEra -> throwCliError deprecatedEra
Right e -> do
e <- fromEitherCli . Exp.sbeToEra $ convert cEraOnwards of

Comment on lines +225 to +228
sbe <- maybeToList $ forEraMaybeEon era
case Exp.sbeToEra sbe of
Left{} -> []
Right e ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant, isn't it? Era is an Eon already.

Suggested change
sbe <- maybeToList $ forEraMaybeEon era
case Exp.sbeToEra sbe of
Left{} -> []
Right e ->
e <- maybeToList $ forEraMaybeEon era

instance Error Text where
prettyError = pretty

instance Error (Exp.DeprecatedEra era) where

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be upstreamed to cardano-api.

Comment thread cardano-cli/src/Cardano/CLI/Read.hs Resolved
@Jimbo4350
Jimbo4350 force-pushed the jordan/experimental-api-propagation-20250523 branch from 90b0999 to 974fe88 Compare May 27, 2025 13:22
@Jimbo4350
Jimbo4350 requested a review from a team May 27, 2025 13:22
@Jimbo4350
Jimbo4350 requested a review from a team as a code owner May 27, 2025 13:22
Comment on lines +150 to +151
( \p ->
fromEitherIOCli @ProposalError $ Exp.obtainCommonConstraints era (readProposal p)

Check notice

Code scanning / hlint

Avoid lambda

cardano-cli/src/Cardano/CLI/Compatible/Transaction/Run.hs:(150,9)-(151,91):&nbsp;Suggestion:&nbsp;Avoid&nbsp;lambda &nbsp;&nbsp; Found: &nbsp;&nbsp;\\&nbsp;p &nbsp;&nbsp;&nbsp;&nbsp;->&nbsp;fromEitherIOCli&nbsp;@ProposalError &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$&nbsp;Exp.obtainCommonConstraints&nbsp;era&nbsp;(readProposal&nbsp;p) &nbsp;&nbsp; Perhaps: &nbsp;&nbsp;fromEitherIOCli&nbsp;@ProposalError &nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;Exp.obtainCommonConstraints&nbsp;era&nbsp;.&nbsp;readProposal
Jimbo4350 added 6 commits May 27, 2025 09:54
 `GovernanceActionUpdateCommitteeCmdArgs`
 `GovernanceActionCreateConstitutionCmdArgs`
 `GovernanceActionInfoCmdArgs`
 `GovernanceActionCreateNoConfidenceCmdArgs`
 `UpdateProtocolParametersConwayOnwards`

 on `Era era` instead of `ShelleyBasedEra era`
@Jimbo4350
Jimbo4350 force-pushed the jordan/experimental-api-propagation-20250523 branch from 93e361e to f2d72f5 Compare May 27, 2025 13:54
@Jimbo4350
Jimbo4350 force-pushed the jordan/experimental-api-propagation-20250523 branch from f2d72f5 to 08286ac Compare May 27, 2025 14:31
@Jimbo4350
Jimbo4350 enabled auto-merge May 27, 2025 14:43
@Jimbo4350
Jimbo4350 added this pull request to the merge queue May 27, 2025
Merged via the queue into master with commit f21767f May 27, 2025
@Jimbo4350
Jimbo4350 deleted the jordan/experimental-api-propagation-20250523 branch May 27, 2025 17:23
Jimbo4350 added a commit that referenced this pull request May 14, 2026
Adapt to cardano-api PR #1209, which removes the legacy 'TxOut CtxTx era'
from the Compatible and Experimental APIs:

  * 'createCompatibleTx' now takes '[Exp.TxOut (ShelleyLedgerEra era)]'
    plus a new 'Map L.DataHash (L.Data ...)' argument carrying any
    supplemental datum bodies. The legacy 'TxOut CtxTx era' bundled
    supplemental datums inside outputs; 'Exp.TxOut' only carries the
    datum hash, so callers thread the full datum bodies in explicitly.
  * The bridge helpers 'fromLegacyTxOut', 'legacyDatumToDatum',
    'supplementalDatumFromLegacy', 'toLedgerDatum', and the
    'DatumDecodingError' type are deleted from 'Cardano.Api.Experimental.Tx'.

Migration:

  * 'mkTxOut' and 'toTxOutInAnyEra' now return
    '(Exp.TxOut (ShelleyLedgerEra era), Map DataHash (L.Data ...))'
    directly, building the legacy 'TxOut CtxTx era' internally only as
    a stepping stone for 'toShelleyTxOutAny'.
  * 'createCompatibleTx' call site in 'Compatible/Transaction/Run.hs'
    folds the per-output supplemental datums via 'Map.unions' and
    passes them as the new argument.
  * 'toTxOutInEra' and 'toTxOutInShelleyBasedEra' in
    'EraBased/Transaction/Run.hs' delegate directly to 'mkTxOut' (the
    deleted 'fromLegacyTxOut' is gone).
  * 'TxCmdDatumDecodingError' is removed since the underlying
    'Exp.DatumDecodingError' is gone and the new conversion is total.

Temporary 'cabal.project' additions (to be removed once #1209 is
merged and the next cardano-api is published to CHaP):

  * 'source-repository-package' pointing at the PR branch so CI can
    build against the unpublished API.
  * Per-package '-Wwarn=deprecations -Wwarn=unused-imports' for
    cardano-cli. The PR branch is several commits ahead of
    cardano-api-11.1.0.0 and surfaces unrelated TxBody/TxBodyContent
    deprecations (cardano-api PR #1200) plus a redundant
    'Cardano.Ledger.Core' import in 'Cardano.CLI.Read' that became
    visible after upstream re-exports widened. Both are separate
    cleanups out of scope for this PR.
Jimbo4350 added a commit that referenced this pull request May 19, 2026
Adapt to cardano-api PR #1209, which removes the legacy 'TxOut CtxTx era'
from the Compatible and Experimental APIs:

  * 'createCompatibleTx' now takes '[Exp.TxOut (ShelleyLedgerEra era)]'
    plus a new 'Map L.DataHash (L.Data ...)' argument carrying any
    supplemental datum bodies. The legacy 'TxOut CtxTx era' bundled
    supplemental datums inside outputs; 'Exp.TxOut' only carries the
    datum hash, so callers thread the full datum bodies in explicitly.
  * The bridge helpers 'fromLegacyTxOut', 'legacyDatumToDatum',
    'supplementalDatumFromLegacy', 'toLedgerDatum', and the
    'DatumDecodingError' type are deleted from 'Cardano.Api.Experimental.Tx'.

Migration:

  * 'mkTxOut' and 'toTxOutInAnyEra' now return
    '(Exp.TxOut (ShelleyLedgerEra era), Map DataHash (L.Data ...))'
    directly, building the legacy 'TxOut CtxTx era' internally only as
    a stepping stone for 'toShelleyTxOutAny'.
  * 'createCompatibleTx' call site in 'Compatible/Transaction/Run.hs'
    folds the per-output supplemental datums via 'Map.unions' and
    passes them as the new argument.
  * 'toTxOutInEra' and 'toTxOutInShelleyBasedEra' in
    'EraBased/Transaction/Run.hs' delegate directly to 'mkTxOut' (the
    deleted 'fromLegacyTxOut' is gone).
  * 'TxCmdDatumDecodingError' is removed since the underlying
    'Exp.DatumDecodingError' is gone and the new conversion is total.

Temporary 'cabal.project' additions (to be removed once #1209 is
merged and the next cardano-api is published to CHaP):

  * 'source-repository-package' pointing at the PR branch so CI can
    build against the unpublished API.
  * Per-package '-Wwarn=deprecations -Wwarn=unused-imports' for
    cardano-cli. The PR branch is several commits ahead of
    cardano-api-11.1.0.0 and surfaces unrelated TxBody/TxBodyContent
    deprecations (cardano-api PR #1200) plus a redundant
    'Cardano.Ledger.Core' import in 'Cardano.CLI.Read' that became
    visible after upstream re-exports widened. Both are separate
    cleanups out of scope for this PR.
Jimbo4350 added a commit that referenced this pull request May 19, 2026
cardano-api 11.2.0.0 is published to CHaP. Bump the
cardano-haskell-packages index-state past the publish
(2026-05-18T18:23:40Z), bump the cardano-cli cabal dep from ^>=11.1
to ^>=11.2, and bump the CHaP flake input accordingly.

11.2.0.0 introduces breaking changes that subsequent commits in this
PR migrate cardano-cli to: legacy TxOut removed (cardano-api #1209),
legacy Certificate type removed (#1210), and TxBody/TxBodyContent
deprecated (#1200).
Jimbo4350 added a commit that referenced this pull request May 19, 2026
`TxBodyFile` was a `File (TxBody ())` whose phantom payload was only
ever used as a file-tag for option/parser plumbing; the bytes on disk
do not depend on it. Replace `TxBody ()` with a fresh empty
`TxBodyTag` data type so the alias no longer references the deprecated
`TxBody` from cardano-api PR #1200.

No on-disk format change. No call-site change beyond the alias itself.
Jimbo4350 added a commit that referenced this pull request May 21, 2026
cardano-api 11.2.0.0 is published to CHaP. Bump the
cardano-haskell-packages index-state past the publish
(2026-05-18T18:23:40Z), bump the cardano-cli cabal dep from ^>=11.1
to ^>=11.2, and bump the CHaP flake input accordingly.

11.2.0.0 introduces breaking changes that subsequent commits in this
PR migrate cardano-cli to: legacy TxOut removed (cardano-api #1209),
legacy Certificate type removed (#1210), and TxBody/TxBodyContent
deprecated (#1200).
Jimbo4350 added a commit that referenced this pull request May 21, 2026
`TxBodyFile` was a `File (TxBody ())` whose phantom payload was only
ever used as a file-tag for option/parser plumbing; the bytes on disk
do not depend on it. Replace `TxBody ()` with a fresh empty
`TxBodyTag` data type so the alias no longer references the deprecated
`TxBody` from cardano-api PR #1200.

No on-disk format change. No call-site change beyond the alias itself.
SuganyaAK pushed a commit to SuganyaAK/cardano-cli that referenced this pull request Nov 10, 2026
cardano-api 11.2.0.0 is published to CHaP. Bump the
cardano-haskell-packages index-state past the publish
(2026-05-18T18:23:40Z), bump the cardano-cli cabal dep from ^>=11.1
to ^>=11.2, and bump the CHaP flake input accordingly.

11.2.0.0 introduces breaking changes that subsequent commits in this
PR migrate cardano-cli to: legacy TxOut removed (cardano-api IntersectMBO#1209),
legacy Certificate type removed (IntersectMBO#1210), and TxBody/TxBodyContent
deprecated (IntersectMBO#1200).
SuganyaAK pushed a commit to SuganyaAK/cardano-cli that referenced this pull request Nov 10, 2026
`TxBodyFile` was a `File (TxBody ())` whose phantom payload was only
ever used as a file-tag for option/parser plumbing; the bytes on disk
do not depend on it. Replace `TxBody ()` with a fresh empty
`TxBodyTag` data type so the alias no longer references the deprecated
`TxBody` from cardano-api PR IntersectMBO#1200.

No on-disk format change. No call-site change beyond the alias itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants