Skip to content

Conversation

@ronag
Copy link
Member

@ronagronag commented Jun 23, 2020

Simplifies async iteration for Readable using async generator.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@ronagronag added the stream Issues and PRs related to the stream subsystem. label Jun 23, 2020
@ronagronagforce-pushed the readable-async-iterator branch 2 times, most recently from a754d9b to bdded9eCompareJune 23, 2020 21:12
@nodejs-github-bot
Copy link
Collaborator

@ronag
Copy link
MemberAuthor

Might be relevant for #30298

@ronag
Copy link
MemberAuthor

Some really strange CI failures... will investigate

@ronagronagforce-pushed the readable-async-iterator branch 11 times, most recently from 647a0ab to 0bbbed1CompareJune 25, 2020 13:19
@nodejs-github-bot

This comment has been minimized.

@ronagronagforce-pushed the readable-async-iterator branch 5 times, most recently from a111d8d to 8944c59CompareJune 25, 2020 13:37
@ronagronag requested a review from mcollinaJune 25, 2020 13:42
@ronag
Copy link
MemberAuthor

ronag commented Jun 25, 2020

@mcollina PTAL when you have time. No hurry.

There are 3 tests that I have commented out which fail. These failures seem to be related to difference between how an async iterator from an async generator i.e. async function* works and how our custom async iterator works. I would guess that the behavior from async generator should be more spec compliant? Or maybe it's a timing issue? Either way probably a semver-major.

  1. the async iterator prototype test.
  2. next promises are not rejected, but instead resolved

ronag added a commit that referenced this pull request Jul 17, 2020
Reimplement as an async generator instead of a custom iterator class. PR-URL: #34035 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
@ronag
Copy link
MemberAuthor

Landed in 08e8997

@ronagronag closed this Jul 17, 2020
cjihrig pushed a commit that referenced this pull request Jul 23, 2020
Reimplement as an async generator instead of a custom iterator class. PR-URL: #34035 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
@ronag
Copy link
MemberAuthor

ronag commented Aug 1, 2020

@nodejs/tsc @mcollina@benjamingr I defensively marked this as semver-major. However, it would be nice to land this on v14 as it might become the basis for future semver-minor changes.

@mcollinamcollina added the tsc-agenda Issues and PRs to discuss during the meetings of the TSC. label Aug 2, 2020
@mcollina
Copy link
Member

I concur with @ronag. We might want to land this on v14 before it goes to LTS.

@ronag
Copy link
MemberAuthor

ronag commented Aug 8, 2020

@Trott This didn't make it to the tsc agenda this week? I guess it's because the PR is closed?

@mcollina
Copy link
Member

@ronag can you please open an issue or a PR so it gets there?

@ronag
Copy link
MemberAuthor

ronag commented Aug 8, 2020

Done

richardlau pushed a commit that referenced this pull request Sep 7, 2020
Reimplement as an async generator instead of a custom iterator class. Backport-PR-URL: #34887 PR-URL: #34035 Refs: #34680 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
@richardlaurichardlau mentioned this pull request Sep 7, 2020
4 tasks
richardlau pushed a commit that referenced this pull request Sep 7, 2020
Reimplement as an async generator instead of a custom iterator class. Backport-PR-URL: #34887 PR-URL: #34035 Refs: #34680 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
richardlau added a commit that referenced this pull request Sep 7, 2020
Notable changes: - buffer: also alias BigUInt methods (Anna Henningsen) #34960 - crypto: add randomInt function (Oli Lalonde) #34600 - perf_hooks: add idleTime and event loop util (Trevor Norris) #34938 - stream: simpler and faster Readable async iterator (Robert Nagy) #34035 - stream: save error in state (Robert Nagy) #34103 PR-URL: #35023
richardlau added a commit that referenced this pull request Sep 8, 2020
Notable changes: - buffer: also alias BigUInt methods (Anna Henningsen) #34960 - crypto: add randomInt function (Oli Lalonde) #34600 - perf_hooks: add idleTime and event loop util (Trevor Norris) #34938 - stream: simpler and faster Readable async iterator (Robert Nagy) #34035 - stream: save error in state (Robert Nagy) #34103 PR-URL: #35023 Conflicts: src/node_version.h
MylesBorins pushed a commit that referenced this pull request Oct 15, 2020
includes: * stream: simpler and faster Readable async iterator * stream: don't destroy on async iterator success * stream: async iterator stop read if destroyed PR-URL: #34887 Refs: #34035 Refs: #35122 Refs: #35640 Refs: #34680 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Notable changes: - buffer: also alias BigUInt methods (Anna Henningsen) nodejs#34960 - crypto: add randomInt function (Oli Lalonde) nodejs#34600 - perf_hooks: add idleTime and event loop util (Trevor Norris) nodejs#34938 - stream: simpler and faster Readable async iterator (Robert Nagy) nodejs#34035 - stream: save error in state (Robert Nagy) nodejs#34103 PR-URL: nodejs#35023 Conflicts: src/node_version.h
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.semver-majorPRs that contain breaking changes and should be released in the next major version.streamIssues and PRs related to the stream subsystem.tsc-agendaIssues and PRs to discuss during the meetings of the TSC.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@ronag@nodejs-github-bot@mcollina@benjamingr@jasnell@Trott@devsnek@lundibundi@targos