cardano-testnet: Clean up conf constructor naming in cardano-testnet - #6637
Open
palas wants to merge 2 commits into
Open
cardano-testnet: Clean up conf constructor naming in cardano-testnet#6637palas wants to merge 2 commits into
palas wants to merge 2 commits into
Conversation
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.
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.
Description
Testnet.Start.Typeshad three constructors for*Conf*whose names did not communicate how they differ:mkConf,mkConfigandmkConfigAbs. See issue: #6569This PR:
mkConf(Its only difference with the puremkConfigwas noting the directory in the test log, which was redundant, since every call site passes a workspace path thathedgehog-extrasworkspacealready annotates it on creation ("Workspace: ").mkConfigdirectly, which is now exported (and re-exported fromCardano.Testnetin place ofmkConf). The call sites that additionally wrappedmkConfinH.noteShowMkeep theirConfannotation viaH.noteShow.mkConfigAbstomkConfigAbsolute, and documents that, besides making the path absolute, it also creates the directory if it does not exist yet.Checklist
See Running tests for more details
CHANGELOG.mdfor affected packagecardano-node-chairman,cardano-submit-apiandcardano-testnetinstead need achangelog fragment in
<package>/.changes/, because theirCHANGELOG.mdis generatedfrom fragments at release time. Copy
_TEMPLATE.ymlfrom that directory, or runnix run github:input-output-hk/cardano-dev#herald -- new.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-9.6andghc-9.12