Skip to content

Remove the unused ByronToAlonzoEra eon#1260

Draft
Jimbo4350 wants to merge 2 commits into
masterfrom
jordan/remove-byrontoalonzoera-eon
Draft

Remove the unused ByronToAlonzoEra eon#1260
Jimbo4350 wants to merge 2 commits into
masterfrom
jordan/remove-byrontoalonzoera-eon

Conversation

@Jimbo4350

Copy link
Copy Markdown
Contributor

Context

Removes the unused ByronToAlonzoEra eon — sister cleanup to the cardano-cli eon removal in IntersectMBO/cardano-cli#1397.

ByronToAlonzoEra (the Cardano.Api.Era.Internal.Eon.ByronToAlonzoEra module) has zero consumers anywhere — cardano-api, cardano-cli, and cardano-node all reference it only via the re-export. It has no case… eliminator either. So this deletes the module, its cardano-api.cabal entry, and the Cardano.Api.Era import/re-export.

This is the safe, standalone part of the broader eon sunset. The three closed-range eons that cli#1397 just freed up — ShelleyToAllegraEra, ShelleyToAlonzoEra, ShelleyToMaryEra — are a breaking removal that must wait until cli#1397 merges and cardano-cli releases against it; they'll follow in a separate PR (at which point this one may be renamed/folded into a broader "remove dead closed-range eons").

How to trust this PR

  • git grep ByronToAlonzoEra returns nothing after this change.
  • Removal is export-only: no code path used the type, its constructors, or byronToAlonzoEraConstraints.
  • Verified with cabal build cardano-api -j4 (clean).

It is an API break (a public export is gone), hence kind: breaking in the changelog fragment.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • No version bounds need updating; there are no dependency changes
  • Self-reviewed the diff
  • Changelog fragment added in .changes/

Deletes the Cardano.Api.Era.Internal.Eon.ByronToAlonzoEra module together with
its cardano-api.cabal entry and Cardano.Api.Era re-export. The ByronToAlonzoEra
eon has no consumers anywhere (cardano-api, cardano-cli or cardano-node), so
this is a pure removal of dead public API.
@Jimbo4350
Jimbo4350 force-pushed the jordan/remove-byrontoalonzoera-eon branch from 247c755 to 226cd76 Compare July 20, 2026 20:16
@Jimbo4350
Jimbo4350 marked this pull request as ready for review July 20, 2026 20:16
Copilot AI review requested due to automatic review settings July 20, 2026 20:16
@Jimbo4350
Jimbo4350 marked this pull request as draft July 20, 2026 20:18

Copilot AI left a comment

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.

Pull request overview

This PR is intended to remove the unused ByronToAlonzoEra closed-range eon from the cardano-api public surface (via Cardano.Api.Era) and from the library build plan.

Changes:

  • Deletes the Cardano.Api.Era.Internal.Eon.ByronToAlonzoEra module and removes its Cardano.Api.Era re-export/import.
  • Updates cardano-api.cabal to stop listing ByronToAlonzoEra in other-modules.
  • Adds a breaking-change changelog fragment in .changes/.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cardano-api/src/Cardano/Api/Era/Internal/Eon/ShelleyToMaryEra.hs Deleted module (note: currently conflicts with PR description and leaves dangling references elsewhere).
cardano-api/src/Cardano/Api/Era/Internal/Eon/ShelleyToAlonzoEra.hs Deleted module (note: currently conflicts with PR description and leaves dangling references elsewhere).
cardano-api/src/Cardano/Api/Era/Internal/Eon/ShelleyToAllegraEra.hs Deleted module (note: currently conflicts with PR description and leaves dangling references elsewhere).
cardano-api/src/Cardano/Api/Era/Internal/Eon/ByronToAlonzoEra.hs Deletes the intended unused eon module.
cardano-api/src/Cardano/Api/Era.hs Removes the ByronToAlonzoEra re-export/import, but still references deleted ShelleyTo* eons.
cardano-api/cardano-api.cabal Removes ByronToAlonzoEra from other-modules, but still lists deleted ShelleyTo* eons.
.changes/20260720_remove_byrontoalonzoera_eon.yml Marks the change as breaking, but description no longer matches the effective diff scope.
Comments suppressed due to low confidence (1)

cardano-api/src/Cardano/Api/Era.hs:22

  • This module still re-exports ShelleyToAllegraEra, ShelleyToAlonzoEra, and ShelleyToMaryEra, but those modules do not exist under cardano-api/src/Cardano/Api/Era/Internal/Eon/ in this PR (only ShelleyToBabbageEra is present). This will fail to compile with “Could not find module …”. Either restore the removed eon modules, or remove these re-exports and update any dependent API (e.g. the caseShelleyTo* helpers) accordingly.
  , module Cardano.Api.Era.Internal.Eon.ShelleyToAllegraEra
  , module Cardano.Api.Era.Internal.Eon.ShelleyToAlonzoEra
  , module Cardano.Api.Era.Internal.Eon.ShelleyToBabbageEra
  , module Cardano.Api.Era.Internal.Eon.ShelleyToMaryEra

Comment on lines 80 to 85
import Cardano.Api.Era.Internal.Eon.AllegraEraOnwards
import Cardano.Api.Era.Internal.Eon.AlonzoEraOnwards
import Cardano.Api.Era.Internal.Eon.BabbageEraOnwards
import Cardano.Api.Era.Internal.Eon.ByronToAlonzoEra
import Cardano.Api.Era.Internal.Eon.Convert
import Cardano.Api.Era.Internal.Eon.ConwayEraOnwards
import Cardano.Api.Era.Internal.Eon.MaryEraOnwards
Comment on lines 217 to 222
Cardano.Api.Era.Internal.Eon.AllegraEraOnwards
Cardano.Api.Era.Internal.Eon.AlonzoEraOnwards
Cardano.Api.Era.Internal.Eon.BabbageEraOnwards
Cardano.Api.Era.Internal.Eon.ByronToAlonzoEra
Cardano.Api.Era.Internal.Eon.Convert
Cardano.Api.Era.Internal.Eon.ConwayEraOnwards
Cardano.Api.Era.Internal.Eon.MaryEraOnwards
pr: 1260
kind:
- breaking
description: Remove the unused `ByronToAlonzoEra` eon (the `Cardano.Api.Era.Internal.Eon.ByronToAlonzoEra` module and its `Cardano.Api.Era` re-export); it had no consumers.
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.

2 participants