Skip to content
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

Remove domains in favor of try/catch on async/await #752

Closed
geek opened this issue Sep 17, 2017 · 14 comments
Closed

Remove domains in favor of try/catch on async/await #752

geek opened this issue Sep 17, 2017 · 14 comments
Assignees
Milestone

Comments

@geek
Copy link
Member

@geek geek commented Sep 17, 2017

No description provided.

@geek geek self-assigned this Sep 17, 2017
@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented Sep 18, 2017

Is it really necessary that lab also follows that ? I know domains are a pain but this is forcing the style of tests you're allowed to do.

@geek

This comment has been minimized.

Copy link
Member Author

@geek geek commented Sep 18, 2017

I don't think we will want to remove the done callback style, but instead I am going to try to promisify these callbacks and use async/await with try/catch instead of domains. Thoughts?

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented Sep 18, 2017

This is going to force a massive rewrite of all the tests under the hapi.js umbrella, we're probably going there anyway, but still. It will also force many people using lab outside of our own ecosystem to follow that style, this is ultimately a hard choice.

@geek

This comment has been minimized.

Copy link
Member Author

@geek geek commented Sep 18, 2017

The breaking change will be because we are dropping support for pre-node 8 engines. Everything else should stay functionally the same

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented Sep 18, 2017

If you remove domains you can either say goodbye to callbacks or parallel, I don't see a way around that.

@geek geek added this to the 15.0.0 milestone Oct 12, 2017
@geek

This comment has been minimized.

Copy link
Member Author

@geek geek commented Oct 12, 2017

@Marsup in v15 I will remove support for callbacks in the tests and expect a promise only. That said, I will keep supporting lab v14

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented Oct 12, 2017

Where will any uncaught exception appear ?

@geek

This comment has been minimized.

Copy link
Member Author

@geek geek commented Oct 12, 2017

They will still appear in the console and will fail the test where they appeared from.

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented Oct 12, 2017

Without domains? How can that be?

@geek

This comment has been minimized.

Copy link
Member Author

@geek geek commented Oct 12, 2017

...They fail the test executing when the exception occurs.

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented Oct 12, 2017

The keyword in my sentence was "uncaught" 😉

@Marsup

This comment has been minimized.

Copy link
Member

@Marsup Marsup commented Oct 12, 2017

OK so no parallel anymore, got it.

@AdriVanHoudt

This comment has been minimized.

Copy link
Contributor

@AdriVanHoudt AdriVanHoudt commented Oct 13, 2017

Unless in multiple processes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.