Skip to content

cardano-testnet: Clean up conf constructor naming in cardano-testnet - #6637

Open
palas wants to merge 2 commits into
masterfrom
6569-conf-naming
Open

cardano-testnet: Clean up conf constructor naming in cardano-testnet#6637
palas wants to merge 2 commits into
masterfrom
6569-conf-naming

Conversation

@palas

@palas palas commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Testnet.Start.Types had three constructors for *Conf* whose names did not communicate how they differ: mkConf, mkConfig and mkConfigAbs. See issue: #6569

This PR:

  • Removes mkConf (Its only difference with the pure mkConfig was noting the directory in the test log, which was redundant, since every call site passes a workspace path that hedgehog-extras workspace already annotates it on creation ("Workspace: ").
  • Test code now uses mkConfig directly, which is now exported (and re-exported from Cardano.Testnet in place of mkConf). The call sites that additionally wrapped mkConf in H.noteShowM keep their Conf annotation via H.noteShow.
  • Renames mkConfigAbs to mkConfigAbsolute, and documents that, besides making the path absolute, it also creates the directory if it does not exist yet.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Running tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
    • cardano-node-chairman, cardano-submit-api and cardano-testnet instead need a
      changelog fragment in <package>/.changes/, because their CHANGELOG.md is generated
      from fragments at release time. Copy _TEMPLATE.yml from that directory, or run
      nix run github:input-output-hk/cardano-dev#herald -- new
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

Testnet.Start.Types had three constructors for Conf whose names did
not communicate how they differ: mkConf, mkConfig and mkConfigAbs.

Remove mkConf. Its only difference with the pure mkConfig was noting
the directory in the test log, which was redundant: every call site
passes a workspace path that hedgehog-extras' 'workspace' already
annotates on creation ("Workspace: <dir>"). Test code now uses
mkConfig directly, which is now exported (and re-exported from
Cardano.Testnet in place of mkConf). The call sites that additionally
wrapped mkConf in H.noteShowM keep their Conf annotation via
H.noteShow.

Rename mkConfigAbs to mkConfigAbsolute, and document that, besides
making the path absolute, it also creates the directory if it does
not exist yet.
@palas palas self-assigned this Aug 4, 2026
@palas
palas requested a review from a team as a code owner August 4, 2026 22:09
@palas palas linked an issue Aug 4, 2026 that may be closed by this pull request
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.

Clean up mkConf / mkConfig / mkConfigAbs naming in cardano-testnet

1 participant