-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate some patterns, remove their internal use #728
Conversation
a3e7827
to
74c7f2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know about this change - I don't know how popular are patterns across cardano-api consumers. Those patterns are convenient, but somewhat magical, like TxBody
, doing suddenly a whole conversion.
@Jimbo4350 thoughts?
, AsByronTx | ||
, AsShelleyTx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM however I would not delete the patterns off the bat. Deprecate them first and after 2 major releases we can remove them.
74c7f2e
to
0e25624
Compare
0e25624
to
7f8d417
Compare
Changelog
Context
Our codebase is hard to enter. It's big, it redefines types with the same names from the ledger, it has a complex witness system, it has historical quirks. This PR aims at reducing one of the things you need to understand to contribute to this codebase: patterns. The patterns that are deprecated by this PR are easily replaced by a few functions calls there and there. This shows on the count of lines changed: it's more deletion (51) than additions (22).
In additions, this barely impacts the CLI, as the corresponding CLI PR shows.
For the record, this PR is a spin-off of this work: #724
Follow-up
If this one obtains support, I can go further and deprecate more patterns. Up to reviewers to tell me which direction to go. [edit] Approval obtained, see: #728 (review)
I will also create an issue to follow-up on definitely removing the patterns that are deprecated by this PR.
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