-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e2a0ed9
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.
Thank you for all your work you have been putting into this ❤️ I have to emphasise how important this package is for WebdriverIO as it simplifies users automating a browser or a mobile device. It is particularly helpful for people that come from the Java universe or other languages to Node.js and are confused about how promises or generators work. I hope it will be possible to support this a bit longer. Cheers!
e2a0ed9
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.
I couldn't agree more. I honestly wish node.js would have adopted this approach officially at it's much more powerful and yet, still less complex than single stack approach.
e2a0ed9
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.
@laverdet I'm truly impressed by you work in pioneering this library in the NodeJS ecosystem and admire your efforts in maintaining it thus far, this decision makes a total sense.
"It is inevitable that one day this library will abruptly stop working and no one will be able to do anything about it."
I'm wondering, do you have a reason to believe that this might happen in Node 14 or 15? or guesses on why this might happen sooner than later? This clarification is relevant for projects that depend on this package and trying to figure out their long-term plan and if and when should they migrate.
Finally, any tips/recommendations for the projects that plan to migrate would to modern ES is really appreciated.
Once again, thank you for your amazing work and giving the community so much. 👍
e2a0ed9
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.
nodejs has an abstraction called async hooks which attempts to track resources through async call stacks and improve diagnostics and debuggabilty. While not fundamentally incompatible with fibers it is definitely not built with fibers in mind. Discussions with the node team about building this with fibers in mind stalled out [#365], and not without justification.
Furthermore fibers is built on a hack to trick v8 into thinking that each fiber is actually a new thread. I poke around in thread-local storage using horrifying techniques that would make any site reliability engineer lose sleep at night coroutine.cc. It's actually astounding that such a hack has lasted for so long. There is a backup plan in case this stops working.. I could make each active fiber a distinct thread. This would drastically change the performance characteristics of fibers and might very well be a nonstarter for some applications.
Finally fibers violates control flow invariants which are core to JS. Truthfully this hasn't been a problem in practice, but it's definitely an added risk for applications.
My tips for migration are to use async/await. I understand that in some ways these are less powerful than fibers, but it's my opinion that official support from the JS ecosystem is worth the tradeoff.
e2a0ed9
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.
Thank you so much laverdet for your response, I think this information will help the community in the maintenance and the future decision-making processes.
e2a0ed9
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.
Just wanted to come back to say that Webdriver.IO has moved on: https://webdriver.io/blog/2021/07/28/sync-api-deprecation