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

Adding in support for async iterators #1895

Merged
merged 4 commits into from
Dec 4, 2019

Conversation

Pauan
Copy link
Contributor

@Pauan Pauan commented Dec 4, 2019

Async iterators were standardized in ES2018 and are available in all browsers except for Edge. This adds in the minimum amount of support for them.

Ideally we would want to have convenience functions for converting from a Rust Stream into a JS iterable (and vice versa), but maybe that would be better served by gloo.

@alexcrichton
Copy link
Contributor

Looks good to me! Could a few small tests be added if it's been added to Node as well?

I think that a test assertion may need an update in the UI test suite as well?

@Pauan
Copy link
Contributor Author

Pauan commented Dec 4, 2019

I think the test failures aren't related to this PR. Or at least, I don't see how they're related.

@alexcrichton
Copy link
Contributor

I believe the UI tests are caused by this PR, since other PRs are not suffering the same issues. You can update them by running the tests and setting TRYBUILD=overwrite

@Pauan
Copy link
Contributor Author

Pauan commented Dec 4, 2019

@alexcrichton Fixed. The fact that merely adding a new type in a completely unrelated crate causes test failures seems incredibly brittle.

Python fixes this problem by allowing you to use ... in UI tests. The ... basically acts like a .* in regexps, saying "match anything".

So in this case, if the 62 was replaced with ... (or equivalent) then it wouldn't break when adding new types.

@alexcrichton alexcrichton merged commit a1d9039 into rustwasm:master Dec 4, 2019
@alexcrichton
Copy link
Contributor

Yeah UI tests aren't always the easiest to work with, but I'd be fine with any changes that makes them less brittle!

@Pauan Pauan deleted the async-iterator branch December 5, 2019 00:25
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.

2 participants