-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
chore(dependencies): update bluebird v.3 #1904
Conversation
Ping @dignifiedquire |
This is not enough, there is more cancellation happening in that file that will fail with the Bluebird@3. See for some details where I have started work on this. Also it is important that the cancellation continues to work on a refresh while doing a refresh for performance reasons |
There is no other cancellation happening in the whole karma library. There might be peer dependencies that use cancellation but not in here anymore. There is a CancellationError thrown but this is just the error itself that is thrown without any cancellation happening there. So this will work just as before. I saw your work and my first attempt to solve this looked almost the same. But this is not the solution to this, as the way how it worked earlier is the same as how I implemented it right now. Earlier, the promise was cancelled and the other promise was returned. But that promise ended in nirvana, as it is not truly responsible for the refresh. That is handled in the So if I'm not really mistaken, the cancellation never had any effect and there's already a test in place that does a refresh while a refresh is ongoing and this would not pass otherwise. |
I see, but if do not cancel, won't this line https://github.com/BridgeAR/karma/blob/master/lib/file-list.js#L201 still be called? resulting in multiple emits even though the earlier one should have been canceled and not be emitted? |
True point. Fixed and improved the test to catch that |
Thanks will review closely later today |
I think this doing now what we want. Thanks a lot for being patient with me :) |
Just one thing can you change the commit messages please, the first to sth |
@dignifiedquire of course :) Fixed |
Thanks |
chore(dependencies): update bluebird v.3
Fixes #1859
I can't see that the cancellation is needed in this case as the promise that is cancelled is a runaway promise anyway.