-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Normative: Add Array.fromAsync #3581
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
base: add-builtin-async-function-objects
Are you sure you want to change the base?
Normative: Add Array.fromAsync #3581
Conversation
The error for The errors like "Call returns a Completion Record, but is not consumed as if it does" refer to the convention that every completion-returning AO should be invoked as The failure of the "enforce format" job can be fixed by running "npm run format", as it says. Most of the other errors are pretty clear, I think, but let me know if there's any that are not. We can address them ourselves if you don't get to them first. |
2b41c14
to
2f2a9a9
Compare
From [proposal-array-from-async](https://github.com/tc39/proposal-array-from-async).
2f2a9a9
to
b4c45be
Compare
ecmarkup / format errors have been fixed. This pull request is finally ready for Stage 3/4 sign-off from the Editors. @nicolo-ribaudo, you might find this pull request more convenient to re-review than tc39/proposal-array-from-async#50 too. There are minor build errors from esmeta that seem to be due to the algorithm’s use of the new IfAbruptCloseAsyncIterator operation. We can do editorial refactoring later to make the algorithm use IteratorNext, IteratorComplete, and IteratorValue, like how Array.from now does. Thanks to @bakkot for help, here and on Matrix. |
Please note that the proposal-array-from-async proposal is out of date and still has a pending pull request (tc39/proposal-array-from-async#50). The most up-to-date version is the tc39/ecma262#3581 pull request linked in the table.
Please note that the proposal-array-from-async proposal is out of date and still has a pending pull request (tc39/proposal-array-from-async#50). The most up-to-date version is the tc39/ecma262#3581 pull request linked in the table.
Co-authored-by: Linus Groh <[email protected]>
Co-authored-by: Linus Groh <[email protected]>
If ESMeta doesn’t yet recognize the new operation, please feel free to ask us to add support rather than refactoring just to avoid build errors. If keeping IfAbruptCloseAsyncIterator makes the spec more readable than rewriting everything around IteratorNext, IteratorComplete, and IteratorValue, we’d prefer to leave it as-is. Let us know by opening an issue at ESMeta or dropping a comment, and we’ll get the new syntax supported.
|
Co-authored-by: Michael Ficarra <[email protected]>
As a courtesy to the editors reviewing this pull request, I would like to explicitly propose making the following editorial changes:
|
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 otherwise.
WFM |
Co-Authored-By: Michael Ficarra <[email protected]>
…s arg to items The behavior of Array.fromAsync must be marked as “async” in order to activate the special “built-in async function” mechanisms in tc39#2942.
From proposal-array-from-async. Based on #2942 and tc39/proposal-array-from-async#50.
This is a draft for formal Stage 3 / 4 sign-offs (tc39/proposal-array-from-async#14) by the Editors, as per tc39/proposal-array-from-async#14 (comment).
There are currently several errors when building with ecmarkup 21.2.0.There are no more build errors except for a minor esmeta error, which is addressed by #3614.CC: @syg, @bakkot, @michaelficarra