Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upPorter.Multi #9
Conversation
Qqwy
added some commits
Jul 2, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Qqwy
Jul 3, 2018
Contributor
I've added a call that turns a normal Porter request into a Porter.Multi request, for compatibility's sake :-)
|
I've added a call that turns a normal Porter request into a Porter.Multi request, for compatibility's sake :-) |
| , send | ||
| ) | ||
| {-| With `Porter.Multi` you can create requests that have specialized return values. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
peterszerzo
Jul 4, 2018
Owner
In order to make sure newcomers to the library don't jump straight to this module and get frustrated, I think it makes sense to start this documentation saying something like This is an advanced version of the Porter module that covers ... For most use-cases, using Porter should be sufficient. If, however, you have a tangible issue with expressing chaining and transformations with your port messages, read along :).
I feel like your use-case is on the advanced side, and it would be nice to make sure people don't jump in straight away unless it gives them a real benefit.
peterszerzo
Jul 4, 2018
Owner
In order to make sure newcomers to the library don't jump straight to this module and get frustrated, I think it makes sense to start this documentation saying something like This is an advanced version of the Porter module that covers ... For most use-cases, using Porter should be sufficient. If, however, you have a tangible issue with expressing chaining and transformations with your port messages, read along :).
I feel like your use-case is on the advanced side, and it would be nice to make sure people don't jump in straight away unless it gives them a real benefit.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Qqwy
Jul 4, 2018
Contributor
This change has been made. I hope the wording I ended up using meets your expectations :-).
Qqwy
Jul 4, 2018
Contributor
This change has been made. I hope the wording I ended up using meets your expectations :-).
Qqwy commentedJul 2, 2018
•
edited
Edited 5 times
-
Qqwy
edited Jul 3, 2018 (most recent)
-
Qqwy
edited Jul 2, 2018
-
Qqwy
edited Jul 2, 2018
-
Qqwy
edited Jul 2, 2018
-
Qqwy
edited Jul 2, 2018
-
Qqwy
created Jul 2, 2018
This PR adds the
Porter.Multimodule that allows using requests with specialized response types.Note that I've had to split off some functionality to a
Porter.Internalsmodule to prevent dependency cycles. I am not very happy that these things are theoretically visible to the user (ThePorter.Internalsmodule has to expose them for the other two modules to use it). If you know a way to improve this, that would be nice.EDIT: I now know that as long as you do not add a module to the😄
exposed-modulesof the package information, it will not be visible outside the package. So this is not a problem at all!updatefunction to match).Porter.Multi.fromSimplecall that turns a normalPorter.Requestinto aPorter.Multi.RequestPorter.Multi