-
-
Notifications
You must be signed in to change notification settings - Fork 311
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
Don't trigger unneeded ActionSpyEvent for AsyncAction #784
Conversation
✅ Deploy Preview for mobx canceled.
|
Codecov Report
@@ Coverage Diff @@
## master #784 +/- ##
==========================================
- Coverage 98.81% 98.80% -0.01%
==========================================
Files 56 56
Lines 1933 1931 -2
==========================================
- Hits 1910 1908 -2
Misses 23 23
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Could you please add a bit of tests to verify it :) |
…tions that involve scheduleMicrotask
Yes! I've added a test that verifies the correct behavior. It breaks on master (eventCount == 4) and works correctly with my patch (eventCount == 1). I've also identified that my previous guess about the reasons for extra events being reported might've been wrong. I couldn't reproduce the problem using "continuations" in the test environment, but easily did it with |
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
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.
Please add the Changelog, bump up the version with +2 on mobx. Make sure to invoke set-versions via npm or directly on terminal
@pavanpodila please take a look. I've updated the version as you requested. |
Any progress on this? We are really waiting for this change as await is unusable without it |
It's missing some changes to move forward |
@pavanpodila I've already updated the versions as you requested, twice. But since other commits get merged (often overriding the version you've requested me to adjust) and this one stays without attention, I'm not sure when I need to apply the changes to make the merge happen. I simply don't have enough time to monitor every commit in this repository to apply the version adjustment time and time again. |
Let me check. I'm in transit now |
@all-contributors add @s0nerik for code |
@s0nerik already contributed before to code |
@pavanpodila This pr failed tests. https://github.com/mobxjs/mobx.dart/runs/6815659674?check_suite_focus=true
00:00 +0 -1: AsyncAction run allows updating observable values in an async function [E]
Expected: [0, 2, 3]
Actual: [0, 3]
Which: at location [1] is <3> instead of <2>
package:test_api expect
test/async_action_test.dart 42:7 main.<fn>.<fn>
00:00 +0 -1: Some tests failed. |
* Fix for mobxjs#734 * Update async_action.dart * spy_test.dart: ensure that spy-event is raised only once for async actions that involve scheduleMicrotask * Updated changelog * Updated mobx version * Removed unneeded newline * Removed unneeded newline Co-authored-by: Pavan Podila <[email protected]>
* Fix for mobxjs#734 * Update async_action.dart * spy_test.dart: ensure that spy-event is raised only once for async actions that involve scheduleMicrotask * Updated changelog * Updated mobx version * Removed unneeded newline * Removed unneeded newline Co-authored-by: Pavan Podila <[email protected]>
Fixes #734