-
Notifications
You must be signed in to change notification settings - Fork 28
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
Aliases for inputs and outputs #40
Comments
Do you have an example use-case for that? Could it be solved in plain Ruby by calling |
Concrete example! Nice version: class PayProject < Actor
input :project, type: Project
play CreatePayout,
...
->(result) { result.owner = result.project },
CreateBankAccount,
CreateTransferToBank
end Supa dupa nice version ❤️ : class PayProject < Actor
input :project, type: Project, as: :owner
play CreatePayout,
...
CreateBankAccount,
CreateTransferToBank
end |
I think this would require drastically changing how this is built, since now an organiser is not really involved in how children share tasks. Also Perhaps there could be some kind of shorthand syntax that would help with this specific case, instead? For example we could introduce something like: play CreatePayout,
…
input_rename(owner: :project),
CreateBankAccount,
CreateTransferToBank |
Since the word “rename” implies “changing” the previous, maybe this should be a more generic name tied to the fact that we are copying or aliasing inputs. Perhaps prefixing it by “play” would make sense since it makes it clear we use it in that scenario, e.g.: play CreatePayout,
…
play_input(owner: :project),
CreateBankAccount,
CreateTransferToBank |
@williampollet @AnneSottise: would the |
not bad, but one might find it difficult to understand since we loose the "alias" meaning. what do you think about play CreatePayout,
…
alias_input(owner: :project),
CreateBankAccount,
CreateTransferToBank |
That looks fine to me. Would you care to build a PR for that feature? 🙏🏻 |
Hey ! I made a thing or two regarding this issue. Obvisouly, I missed these last comments 🤡 @sunny can I show you what I've done? It's a bit different from what you guys discussed but I'd like to get your opinion. I cannot push any branch on this repo so if you're interested, could you grant me the rights to do so? |
@AnneSottise I think that you can open a PR from a forked repo |
@AnneSottise Yes you can open a PR directly to the repo from your fork, or you can share a link to a fork 🙏🏻 |
@sunny May I open PR about this issue |
Hey @yyamanoi1222, sure, go for it! |
Hey @sunny !!!!
Thanks for the great work \o/
@AnneSottise and I were wondering what were you thinking about adding aliases to
inputs
andouputs
, such as:Wouldn't it be great ?
The text was updated successfully, but these errors were encountered: