-
-
Notifications
You must be signed in to change notification settings - Fork 926
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
Rewrite stream #2207
Rewrite stream #2207
Conversation
👍 |
@pygy I requested your review since you appear mentioned in the lead up to this PR. |
@porsager Could you add |
Good idea @isiahmeadows ... Would you recommend a single console log on first use? |
@porsager Yes. |
This looks good to me 👍 |
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.
So far, everything LGTM.
@pygy Could you take a look at this? (I'd rather not go without your review, since it appears you were at least somewhat involved indirectly with this PR.) |
Any chance this could go in 2.0? |
ah ok 😊 I also forgot this is versioned by itself, so not strictly tied to 2.0 |
@porsager Could you fix the conflicts? |
# Conflicts: # docs/stream.md # stream/stream.js
Done ;) |
@barneycarroll Does this look okay to you? |
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.
Besides that merge artefact, i'm fine
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.
So after a bit of fiddling trying to solve 2 issues related to mithril streams, I ended up trying to do an implementation from scratch just to get a better understanding of how it all hooked up.
After a bit of back and forth with @pygy on gitter I think I've ended up with a simpler implementation, which at the same time fixes the bugs mentioned above.
Another small benefit is that it is 1-3x faster depending on browser for simple tests using map and compose.
These are the issues being solved by the rewrite
#1714 (PR #2200)
#2197 (PR #2201)
The first one that got merged actually behaves wrong in that it ends the stream completely (wrong fix)
There was also another issue fixed with regards to the changed streams returned in combine which required fixing a test.
At the same time I've also renamed HALT to SKIP, which feels a bit more correct relating to its function.
How Has This Been Tested?
Using all current stream tests, correcting 1 test, and adding another
Types of changes
Checklist:
docs/change-log.md