-
Notifications
You must be signed in to change notification settings - Fork 6
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
[WIP] No longer store payload in States #275
Conversation
@kbrock why remove it though? |
parse_compare_key | ||
parse_compare_key(payload) |
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.
If the argument is that anything in @payload
is duplicated by other ivars I get it, but the fact that we have to pass it in to other methods seems to be contrary to that
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.
we only pass at initialization time.
After that, we do not use it.
This pull request is not mergeable. Please rebase and repush. |
1 similar comment
This pull request is not mergeable. Please rebase and repush. |
This pull request is not mergeable. Please rebase and repush. |
Overview --- We use `Payload#payload` in `State#initialize`, but then do not use it again. This PR still passes `payload` to `initialize`, but drops the `payload` variable. I kept `payload` around to make debugging easier, but in truth, I have never used it to debug. Exceptions --- We do need `Workflow#payload` to validate the state references in `"Next"`. If we store/pass `Workflow#payload["State"].keys` into child initializers, then this can be dropped. We do need `Path#payload`, but this is not a payload but rather a path location.
update:
|
Checked commit kbrock@dd669f1 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint |
I have a structure in mind:
If we completely parse at So not having But Yea, "why remove this?" - this is the reason for keeping this as a WIP from the start. |
Giving up for now |
Overview
We use
Payload#payload
inState#initialize
, but then do not use it again.This PR still passes
payload
toinitialize
, but no longer stores it in an instance variable.Before
I had kept
@payload
around to make debugging easier, but in truth, I have never used it to debug.After
We no longer store
State#payload
.We do need
Workflow#payload
to validate theState#Next
values inState#initalize
.If we store/pass
Workflow#payload["State"].keys
intoState#initialize
, then this can be dropped.We do need
Path#payload
, but this is not apayload
but rather a path location.WIP
This is valid, it is ready, and I like it.
Leaving as WIP to mark it as not a priority.