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

feat(ops): support Result<impl Future<Output = Result<T, AnyError>> + 'static, AnyError> #14869

Merged
merged 1 commit into from
Jun 16, 2022

Conversation

littledivy
Copy link
Member

Support returning a Result<impl Future<Output = Result<T, AnyError>> + 'static, AnyError>. An hybrid op where both sync and async phases are fallible.

@littledivy littledivy changed the title feat(ops): support a result returning a future returning a result feat(ops): support Result<impl Future<Output = Result<T, AnyError>> + 'static, AnyError> Jun 15, 2022
@@ -398,6 +427,8 @@ fn is_handle_scope(arg: &syn::FnArg) -> bool {
|| tokens(arg).ends_with(": & mut v8 :: HandleScope < 'a >")
|| tokens(arg).ends_with(": & mut deno_core :: v8 :: HandleScope")
|| tokens(arg).ends_with(": & mut deno_core :: v8 :: HandleScope < 'a >")
|| tokens(arg).contains("mut v8 :: HandleScope")
|| tokens(arg).ends_with(": & mut v8 :: HandeScope < 'scope >")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case and the first two are covered by the .contains("mut v8 :: HandleScope") above, but I don't know if that should be there.

Should we just use regex in this function for the lifetime parameter?

Copy link
Contributor

@AaronO AaronO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will do some cleanup in a follow up

@AaronO AaronO merged commit 364da46 into denoland:main Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants