-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Refine AddressParser interface #3021
Comments
I still don't understand the implications of functional interfaces and these specific changes. But if you think it's an improvement why not give it a try? |
PR #3103 Uses a slightly different implementation than suggested above to address issues (1) and (2) above, but does not address issue (3). |
Is this issue still open for (3) above, or can it be closed because it has mostly been resolved? |
If not closed, I tend to defer this to 0.18 too. |
Let's leave it open for at least another few days and I'll probably defer it to 0.18, but also open a new smaller issue for 0.17 and maybe create a PR to match. I also want to make a PR for validating already parsed addresses against networks as we recently discussed. |
My understanding is you created the "smaller PR" as #3384 and it was merged. So can we defer this to 0.18? |
I'm removing this as a blocker for 0.17, so that we can go ahead and branch off for beta/rc/release. |
The
AddressParser
interface should probably change from:to something more like:
This addresses the following issue with the current implementation:
@FunctionalInterface
is useful and in this context it could be "strict" or "non-strict" (i.e. may or may not check the Network.Make sure to scroll to the right to see the
AddressFormatException.WrongNetwork
being thrown. We may also want to refine the class hierarchy of AddressFormatException slightly to so thatWrongNetwork
is a separate case (not a subclass of)InvalidPrefix
(aka unknown network) and perhaps even one new case should be added.The text was updated successfully, but these errors were encountered: