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

How generic is pipeTo? #407

Closed
youennf opened this issue Nov 24, 2015 · 6 comments
Closed

How generic is pipeTo? #407

youennf opened this issue Nov 24, 2015 · 6 comments

Comments

@youennf
Copy link
Contributor

youennf commented Nov 24, 2015

It is said in https://streams.spec.whatwg.org/#rs-pipe-to that pipeTo can be applied generically to other objects than ReadableStream.
It is not clear though whether pipeTo accepts WritableStream objects only or other objects as well.
I guess it is the latter but would the spec be able to state it clearly like done for ReadableStream?

@domenic
Copy link
Member

domenic commented Nov 24, 2015

This section of the spec is kind of a mess, I'm sorry.

The intention, per previous discussions in #97, is to have pipeTo actually not be generic. It will only accept true WritableStream objects, and will operate using abstract operations instead of going through the public API. The reference implementation does not yet reflect this.

There's a long dependency chain here unfortunately, such that the proper order is:

I'm sorry this isn't ready yet. In general writable streams need more attention. I hope this helps in the meantime, but let me know if perhaps adding a note like this in the spec text would be helpful...

@youennf
Copy link
Contributor Author

youennf commented Nov 25, 2015

Thanks for the information and links.
I guess it is ok to leave the spec as is if pipeTo does not remain in the limbs for too long.
Otherwise, maybe add something like "pipeTo relying on WritableStream abstract operations, it is expected to change significantly" or loosen the statement that the pipeTo reference implementation is considered normative.

@domenic
Copy link
Member

domenic commented Nov 25, 2015

I've changed the wording a significant bit in the above commit. Thanks very much for bringing this to my attention; the previous wording was pretty off.

I'll work on getting writable streams and pipeTo ready as soon as I can :).

@youennf
Copy link
Contributor Author

youennf commented Nov 26, 2015

"it will not operate via the public readable and writable stream APIs".
Don't you want to say the opposite i.e. pipeTo will operate via public APIs?

@domenic
Copy link
Member

domenic commented Nov 26, 2015

No. The idea from #97 is that it will not be generic, and will operate using abstract operations instead of going through the public API.

@youennf
Copy link
Contributor Author

youennf commented Nov 26, 2015

Right, I misinterpreted the meaning of public, public to JS not to other specs...
I would have phrased it positively though (it will use abstract streams operations).
Anyway, thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants